Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Folks,
I have a macro that opens a new workbook and copies info from its source to the new workbook before renaming the new book with the appended date. My problem is the new workbook is not alway Book1. Anyone know a way to find the new workbook name and use that in my Windows("New Workbook.xls").Activate statement? TIA! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try the below
Dim wb As Workbook Set wb = Workbooks.Add wb.Activate If this post helps click Yes --------------- Jacob Skaria "Stephen" wrote: Hi Folks, I have a macro that opens a new workbook and copies info from its source to the new workbook before renaming the new book with the appended date. My problem is the new workbook is not alway Book1. Anyone know a way to find the new workbook name and use that in my Windows("New Workbook.xls").Activate statement? TIA! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The new workbook will always be the last in the count; you do not need to
save and delete it; Workbooks(workbooks.count).activate Activeworkbook.name = "whatever" "Stephen" wrote: Hi Folks, I have a macro that opens a new workbook and copies info from its source to the new workbook before renaming the new book with the appended date. My problem is the new workbook is not alway Book1. Anyone know a way to find the new workbook name and use that in my Windows("New Workbook.xls").Activate statement? TIA! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Reposting since msft failed to post previous answer, sorry if dupe
A new workbook is always the last one. You can find it with Workbooks(workbooks.count).activate to get the name Workbooks.name = "whatever" "Stephen" wrote: Hi Folks, I have a macro that opens a new workbook and copies info from its source to the new workbook before renaming the new book with the appended date. My problem is the new workbook is not alway Book1. Anyone know a way to find the new workbook name and use that in my Windows("New Workbook.xls").Activate statement? TIA! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find cell in Excel2000 workbook with link from another workbook? | Excel Discussion (Misc queries) | |||
set cell in one workbook to find in another workbook | Excel Programming | |||
Find value in a 2nd workbook | Excel Programming | |||
Open a specific workbook...find value from other open workbook and then insert cells values in cell next to it. | Excel Programming | |||
Cant find workbook | Excel Programming |