Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting the name & path of a hidden WB
Hi,
Is there any way to get the name of a hidden WB in which the code is written? Ofcourse using "Activeworkbook.Name" will give me the name of the active wb and since the wb I'm trying to get is hidden, it's not really active. I also tried "Windows(1).caption" but whenever I open another workbook the index of the hidden workbook might change.. I can't expect the order the user will open the workbooks.. I want the macro to give me the name of the workbook in which it's written. is there any way to do it? thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting the name & path of a hidden WB
Try
ThisWorkbook.Name -- Jacob "Raz" wrote: Hi, Is there any way to get the name of a hidden WB in which the code is written? Ofcourse using "Activeworkbook.Name" will give me the name of the active wb and since the wb I'm trying to get is hidden, it's not really active. I also tried "Windows(1).caption" but whenever I open another workbook the index of the hidden workbook might change.. I can't expect the order the user will open the workbooks.. I want the macro to give me the name of the workbook in which it's written. is there any way to do it? thanks. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting the name & path of a hidden WB
Hi,
you've solved my problem. you have no idea how much time I spent on trying to get the solution to the problem.. I had no idea it's that easy. thank you very much! Try ThisWorkbook.Name "Raz" wrote: Hi, Is there any way to get the name of a hidden WB in which the code is written? Ofcourse using "Activeworkbook.Name" will give me the name of the active wb and since the wb I'm trying to get is hidden, it's not really active. I also tried "Windows(1).caption" but whenever I open another workbook the index of the hidden workbook might change.. I can't expect the order the user will open the workbooks.. I want the macro to give me the name of the workbook in which it's written. is there any way to do it? thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
2007 Worksheet, Hidden Columns, .CSV Format Saves Hidden Column Da | Excel Discussion (Misc queries) | |||
Remove end folder from path found with ThisWorkbook.Path command ? | Excel Programming | |||
Rows hidden by Autofilter vs hidden by changing the Hidden property | Excel Programming | |||
hyperlink navigation path path wrong in Excel 2003 | Excel Discussion (Misc queries) | |||
how to change absolute path to relative path | Excel Worksheet Functions |