Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I have a ss with a few macros. I run them from toolsmacros and from a custom added menu bar item without problem. I also have a custom toolbar with 5 buttons/ macros attached. When I try to run the macros from there I'm getting an error message " A document with the name "Budget2005" is already open. You cannot open two documents with the same name even if the documents are in different folders, .........."blah,blah,blah. I don't have two folders open, these macros used to work from this toolbar and I'm stumped. Any help , as always, would be greatly appreciated. -- jeff |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for each ctl in Commandbars("Custom1")
msgbox ctl.OnAction Next would show you what macro is assigned to each. Make sure they point to the correct workbook. -- Regards, Tom Ogilvy "jeffP" wrote in message ... Hi all, I have a ss with a few macros. I run them from toolsmacros and from a custom added menu bar item without problem. I also have a custom toolbar with 5 buttons/ macros attached. When I try to run the macros from there I'm getting an error message " A document with the name "Budget2005" is already open. You cannot open two documents with the same name even if the documents are in different folders, .........."blah,blah,blah. I don't have two folders open, these macros used to work from this toolbar and I'm stumped. Any help , as always, would be greatly appreciated. -- jeff |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
had a typo in it
Sub ShowOnAction() For Each ctl In CommandBars("Matrix").Controls On Error Resume Next MsgBox ctl.Caption & " - " & ctl.OnAction On Error GoTo 0 Next End Sub Change Matrix to the name of your commandbar -- Regards, Tom Ogilvy "jeffP" wrote in message ... Tom, You were correct about checking where they pointed to. I used SaveAs to back up the file in a different directory and somehow the macros assigned to the cusstombar picked up the full path. I'm not sure how but anyway it's fixed. I tried to use your help w/ the for statement but get Run-time error 5 'invalid procedure or call' . I really don't understand the loop (where to put it,etc) and would appreciate it if you could help me understand how to use it and/or link me to somewhere that could teach me. Thanks for all you help, always. -- jeffP "Tom Ogilvy" wrote in message ... for each ctl in Commandbars("Custom1") msgbox ctl.OnAction Next would show you what macro is assigned to each. Make sure they point to the correct workbook. -- Regards, Tom Ogilvy "jeffP" wrote in message ... Hi all, I have a ss with a few macros. I run them from toolsmacros and from a custom added menu bar item without problem. I also have a custom toolbar with 5 buttons/ macros attached. When I try to run the macros from there I'm getting an error message " A document with the name "Budget2005" is already open. You cannot open two documents with the same name even if the documents are in different folders, .........."blah,blah,blah. I don't have two folders open, these macros used to work from this toolbar and I'm stumped. Any help , as always, would be greatly appreciated. -- jeff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saved Changes Gone Next Time Document is Opened | Excel Discussion (Misc queries) | |||
have invoice # roll up, or add 1, each time document is opened | Excel Worksheet Functions | |||
Activate menus for Office document opened in IE | Excel Discussion (Misc queries) | |||
Document already opened in excel | Excel Discussion (Misc queries) | |||
Identify Document Being opened from an Add-In using Auto_Open? | Excel Programming |