Hi folks,
I'm new to the forum and this my first post. I have very basic knowledge of VBA (basically nothing).
I'm in a bit of a pickle. This is what I have to do: Workbook A has 50+ worksheets with unique names (non-numerical and non-consecutive) with data in range A1:C30. I need to link the data range from Workbook A to the same place (A1:C30) in Workbook B for sheets. So WorkbookA, Sheet1, A1:C30 will be linked to WorkbookB,Sheet1,A1:C30, WorkbookA, Sheet2, A1:C30 will be linked to WorkbookB,Sheet2,A1:C30, WorkbookA, Sheet3, A1:C30 will be linked to WorkbookB,Sheet3,A1:C30... etc
I've just made the workbook name and sheet names up above. The workbooks have different names, but the sheets within both workbooks have the same name. The range (A1:C30) need to stay the same because that data feeds in to chart. I'm using Excel 2010.
I've recorded a macro for the first few slides but don't to manually copy and paste link. Here's what I have:
Windows("WorkbookA.xlsx").Activate
Sheets("Sheet1").Select
Range("A1:C29").Select
Range("C29").Activate
Application.CutCopyMode = False
Selection.Copy
Windows("WorkbookB.xlsx").Activate
Sheets("Sheet1").Select
Range("A1").Select
ActiveSheet.Paste Link:=True
I was thinking of using For Each... Next... Until... but I lack the knowledge to turn that in to a working code.
Hoping for a swift repose. Many thanks in advance!![]()
Ab
Bookmarks