English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

If I have the excel file open and want to switch between the file and another file while running a macro, how do I find the name of the file so that I can reference it later?

2007-11-14 09:19:33 · 1 answers · asked by joke of an engineer 2 in Computers & Internet Programming & Design

1 answers

Your question is a little confusing. If you are wanting to reference the Excel file that is running the macro then all you have to do is use the term "ThisWorkbook". That will reference the file running the macro. So if you want find the name of the workbook that has the macro just enter this into the macro:

MsgBox ThisWorkbook.Name

2007-11-14 22:59:42 · answer #1 · answered by devilishblueyes 7 · 0 0

fedest.com, questions and answers