Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting the workbook number via VBA code
Hello ladies and gentleman,
I am stuck with a problem and wondering if someome could help me to figure it out. What I want to do is to be able to grab the workbook number from a user that may have multiple workbooks open at one time. For example, lets say that a user has workbook1, workbook2 workbook3, workbook4, and workbook5 open. If you go to the Window Menu, you will see that it looks like: 1 - workbook1 2 - workbook2 etc... What I need to grab is the workbook number and place it in my code so I can call it: strWorkbookName = Workbooks(Workbooks.Count).Name I thought that this would bring up the latest workbook that was opened, but this doesn't seem to be the case. Any ideas? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert a Number Code to a Text Code | Excel Discussion (Misc queries) | |||
run code on opening workbook and apply code to certain sheets | Excel Programming | |||
Code in one workbook to call code in another XL file | Excel Programming | |||
Place code from current workbook to new workbook | Excel Programming | |||
Reference code in another workbook from a calling workbook | Excel Programming |