Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using Excel 2003
I have code in workbook1 that - creates workbook2, named "Orders" with a tab named "OpenOrders" (and saves it) - opens an existing workbook, workbook3, named "Stats_Orders" with a tab named "Stats" I want to copy a value from workbook2 to workbook3. Everything works until I try to copy the data from workbook 2 to workbook 3. I get a "subscript out of range" error. A snippet of code: Dim strFromFile as string Dim strDestFile as string Dim LastRowOrders as integer Dim LastRowStats as integer LastRowOrders = 3 LastRowStats = 4 strFromFile = "Orders" strDestFile = "Stats_Orders" Workbooks(strFromFile).Worksheets("OpenOrders").Ra nge("B" & LastRowOrders + 1).Copy Workbooks(strDestFile).Worksheets("Stats").Range(" C", LastRowStats + 1) Your help would be greatly appreciated! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to copy specific data from master workbook to another workbook | Excel Programming | |||
Copy data from Workbook Alpha & reorganize it in Workbook Bravo | Excel Programming | |||
1.Open workbook. 2 copy data. 3 replace data. 4 save workbook. | Excel Programming | |||
loop through a column on a workbook copying data on each row to another workbook, then copy data back to the original workbook | Excel Programming | |||
Selecting data from 1 workbook to copy and paste to a 2nd workbook | Excel Programming |