Thread: This File Name
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default This File Name

Try

Windows(ThisWorkbook.Name).Activate
' or
ThisWorkbook.Activate

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"theillknight "
wrote in message
...
Hi,

Is there a way to create a dynamic filename?

For instance, if I want to create a macro that did:

Windows("THISFILENAME").Activate

but I saved the file under a different name, I would have to
edit the
macro or I would get a subscript out of range error. Any help
would be
greatly appreciated.

Thanks.


---
Message posted from http://www.ExcelForum.com/