Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
This File Name
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/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
This File Name
Phatchef24 is that you?
-- Regards, Tom Ogilvy "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/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
File:1 and File:2 -- Double Files when Opening One File | Excel Discussion (Misc queries) | |||
I saved file A over file B. Can I get file B back? | Excel Discussion (Misc queries) | |||
opening an excel file opens a duplicate file of the same file | Excel Discussion (Misc queries) | |||
I SAVED A FILE OVER ANOTHER A FILE IN EXCEL. THE OLD FILE WAS AN . | Excel Discussion (Misc queries) | |||
i received a file that reads powerpoint document file file exten. | Excel Discussion (Misc queries) |