![]() |
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/ |
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/ |
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/ |
All times are GMT +1. The time now is 01:37 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com