Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Activate workbook using partial name

This also worked perfectly. Thanks for the help.

"Per Jessen" wrote:

Hi

If the workbook DONE* is the active workbook when the macro is started you
can use this before the macro create the new workbook:

Dim wbA as Workbook
Dim wbB as Workbook
Set wbA = ActiveWorkbook

Set wbB=Workbooks.Add
'Your code

'More code

wbA.Activte

Hopes this helps

---
Per

"aileen" skrev i meddelelsen
...
Is it possible to activate a workbook using only part of the worbook name?
e.g. windows("Done.*").Activate. I have two workbooks open, my macro
creates
one of the wb's and the other is already open, but the end of its name
will
change everyday. For example, today the wb name is DONE3209.xlsx but
tomorrow the wb name may be DONE3509.xlsx. The first 4 letters in the wb
name will always be the same so I would like to use that part of the wb
name
only to activate the wb. Thanks in advance for any help.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
activate workbook Kevin Excel Programming 1 June 2nd 08 02:49 PM
Workbook.Activate / Window.Activate problem Tim[_44_] Excel Programming 3 February 3rd 06 11:38 PM
Reference a workbook with only a partial name CC-Khriz Excel Worksheet Functions 0 December 23rd 05 05:40 PM
Workbook.activate Jeff Excel Discussion (Misc queries) 1 December 13th 04 10:22 PM
Activate Other Workbook pauluk[_37_] Excel Programming 16 April 20th 04 07:02 PM


All times are GMT +1. The time now is 02:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"