Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I currently have a file (first.xls) open and use the following code to open a
second (second.xls): sEventName = "Initialization" gsWorkPath = "c:\documents and settings\me\my documents\second.xls" Application.Workbooks.Open Filename:=gsWorkPath This part works. My problem is now I need to read/copy the contents of a tab in second.xls into first.xls. But now I just get "subscript out of range error" everytime I try to work with either file. For example, the line: ActSheet = "sheet1" gives the error and so does: Worksheets("sheet1").Activate How do I refer to a sheet or a workbook now? Worked fine before opening a second one. Thanks in advance. Sample code is MUCH appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Recent security patch created problem in opening Excel Spreadsheet | Excel Discussion (Misc queries) | |||
Opening a spreadsheet problem Excel 2007 | Setting up and Configuration of Excel | |||
Excel 2003 problem opening existing spreadsheet | Excel Discussion (Misc queries) | |||
opening a spreadsheet | New Users to Excel | |||
excel VBA problem - setting workbook as variable & opening/re-opening | Excel Programming |