Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I create 2 workbooks using workbooks.add - how do I refer to the first
inserted workbook as the second is active? Do I need to save the workbooks in order to be able to reference / activate them? Any pointers would be appreciated. Ta Andi |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim bk1 as Workbook, bk2 as Workbook
set bk1 = workbooks.Add set bk2 = workbooks.add bk1.Activate msgbox "Click to continue" bk2.Activate -- Regards, Tom Ogilvy "Andibevan" wrote in message ... If I create 2 workbooks using workbooks.add - how do I refer to the first inserted workbook as the second is active? Do I need to save the workbooks in order to be able to reference / activate them? Any pointers would be appreciated. Ta Andi |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No, all you need to do is to set a workbook object for each workbook as you
add them Set wb1 = Workbooks.Add Set wb2 = Workbooks.Add With wb1 .etc End With -- HTH RP (remove nothere from the email address if mailing direct) "Andibevan" wrote in message ... If I create 2 workbooks using workbooks.add - how do I refer to the first inserted workbook as the second is active? Do I need to save the workbooks in order to be able to reference / activate them? Any pointers would be appreciated. Ta Andi |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i create a macro to rename worksheets in excel? | Excel Discussion (Misc queries) | |||
How to open a new workbook and rename the workbook? | Excel Discussion (Misc queries) | |||
How to create a copy of a folder having five files in it, & rename | Excel Worksheet Functions | |||
How can I rename a Workbook? | Excel Programming | |||
Rename a workbook! | Excel Programming |