Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Greetings,
I'm not getting what I need from a recorded macro, but there is a safe way, right? Having created a workbook 'workbook1' using OLE, I am inserting a 'cover' worksheet from a template workbook, by opening that template workbook which seems to automatically (reliably?) become the active one, and copying the sheet to workbook1. So far so good. Now I need to close out the template workbook and return to the newly inserted sheet in workbook1 and populate some cells. However, (Excel2003) workbook1 does not seem reliably to become active and so the script terminates unexpectedly. Recording a macro while closing one workbook and activating another just produces: ActiveWindow.Close ActiveWindow.WindowState = xlNormal I want to use the *name* of the workbook, explicitly make it active before I do stuff instead of chancing on whatever winds up active... The syntax is escaping me - help please? TIA - Lynn. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I get a validation to run in a macro on a shared workbook? | Excel Discussion (Misc queries) | |||
How do I insert just one worksheet of a workbook into an email? | Excel Discussion (Misc queries) | |||
quickly create extra copies of a worksheet template in a workbook | Excel Worksheet Functions | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Inserting Filtered RC cell information into other worksheets | Excel Discussion (Misc queries) |