Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a macro that does something entirely different, depending on the way I
have opened the file containing the macro. Method 1: Launch Excel, then click the open button and select the file. Method 2: Open my documents folder and double click the *.xls file I am trying to select and copy row1-28, then paste this group down multiple times based on a # in a cell of the original sheet (the one with the macro). The copy cells are in a different workbook, and the paste ranges are also in that same "different workbook" When Method 1 is used, The Active sheet remains to be the 1st workbook, even though I have code that should select and activate the other sheet. When Method 2 is used, The active sheet switches to the "different workbook" just like the code says to do. Code that swaps the active sheet to the "different workbook"... Application.Workbooks("newblankwb.xls").Activate Sheets("Logs").Activate This code wont seem to work for open method 1. Why does this happen? Is there some code that will work the same irreguardless of the way the sheet was opened? -- Regards, John |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
opening an excel file differences - time | Excel Discussion (Misc queries) | |||
Close file and run macro from newly opened file | Excel Programming | |||
Is Workbook read-only because of file permission or because file is already opened? | Excel Programming | |||
How set file open path to filepath of file opened with Explorer ? | Excel Programming | |||
Opening CSV file causes date differences | Excel Programming |