Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel 2002, WinXP
I have a user-created menu item that is applicable to only one file. That menu item is created/deleted by code that is in that one file. However, other files may be open at the same time and I need to make sure that this one file, "ABC", is the active file before executing the menu item code. I thought that ThisWorkbook was always the active file but it isn't. ThisWorkbook is the file that holds the macro that is being executed. How do I check for the active file, as in: If (the active file).Name < "ABC" Then MsgBox "Wrong File" Thanks for your help. Otto |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Can I keep "Windows of active workbook check box" checked | Excel Discussion (Misc queries) | |||
cannot use "Create List" and "Share Workbook" same time | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
Adding "New" "Insert" "Delete" into a workbook to change from data 1 to data 2 etc | Excel Programming |