Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have the following code.
Workbooks.Open Filename:="C:\Documents and Settings\earpn\Desktop\A" Sheets("EmailList").Select Range("A1").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Sheets("Report").Select Range("A2").Select I need to put this into the open procedure of the workbook thats being opened in the first line of the code. So in the code i need to simply select the workbook (A) and paste the code rather than open the workbook (A) and paste the code. I then need to close the workbook that i got the copied cells from. so i need to select that workbook and close it and then select the workbook (A) again. The code above does work when i use it in a new excel workbook and copies and pastes fine (but can't close the other book as i can't seem to select it). Any help on selecting a workbook would be appreciated. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Closing a protected workbook | Excel Discussion (Misc queries) | |||
Closing a workbook upon opening another | New Users to Excel | |||
STOP WORKBOOK CLOSING | Excel Discussion (Misc queries) | |||
Help with closing down a workbook?? | Excel Worksheet Functions | |||
prohibit closing a workbook | Excel Discussion (Misc queries) |