Saturday, 21 April 2018

VBA Excel-2010 How do you add data to an external workbook

Use variables to hold you workbooks and reference those


Dim wb As Workbook , path As String, wbOther As Workbook
path = "workbookpath"
Set wb = Application.Workbooks.Open(path)
Set wbOther = ThisWorkbook
wbOther.Worksheets("Sheet1").Range("A1") = wb.Worksheets("Sheet1").Range("A1")

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...