Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
returning workbook name
Hi
How do I return the name of my current workbook in code? Just the name ... path not essential. Thanks Graeme |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
returning workbook name
MsgBox ActiveWorkbook.Name
|
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
returning workbook name
application.ActiveWorkbook.Name
"Saladin" wrote: Hi How do I return the name of my current workbook in code? Just the name ... path not essential. Thanks Graeme |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
returning workbook name
msgbox ActiveWorkbook.Name
this returns the name of the currently active workbook msgbox ThisWorkbook.Name this returns the name of the workbook that is running the code So if code is running in Book1 but book2 is active, then the first msgbox gives Book2 and the second gives Book1 x=3 msgbox Workbooks(x).Name DIM WB as Workbook FOR EACH WB in Workbooks Debug.Priint WB.Name NEXT "Saladin" wrote: Hi How do I return the name of my current workbook in code? Just the name ... path not essential. Thanks Graeme |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
returning workbook name
Gosh that was quick! Thanks all.
"Patrick Molloy" wrote in message ... msgbox ActiveWorkbook.Name this returns the name of the currently active workbook msgbox ThisWorkbook.Name this returns the name of the workbook that is running the code So if code is running in Book1 but book2 is active, then the first msgbox gives Book2 and the second gives Book1 x=3 msgbox Workbooks(x).Name DIM WB as Workbook FOR EACH WB in Workbooks Debug.Priint WB.Name NEXT "Saladin" wrote: Hi How do I return the name of my current workbook in code? Just the name ... path not essential. Thanks Graeme |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Returning info from another workbook | Excel Discussion (Misc queries) | |||
Returning a text by searching the whole workbook | Excel Discussion (Misc queries) | |||
Links to another workbook returning 0 | Excel Discussion (Misc queries) | |||
Returning to original workbook | Excel Programming | |||
trouble returning a workbook level Name object | Excel Programming |