Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Error document already opened

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Error document already opened

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





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Error document already opened

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







  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Error document already opened

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saved Changes Gone Next Time Document is Opened Justin Excel Discussion (Misc queries) 2 October 24th 07 09:24 PM
have invoice # roll up, or add 1, each time document is opened Syndee Excel Worksheet Functions 3 March 28th 07 01:04 AM
Activate menus for Office document opened in IE PA Bear Excel Discussion (Misc queries) 0 January 11th 07 09:24 PM
Document already opened in excel Hday Excel Discussion (Misc queries) 2 February 1st 05 10:25 PM
Identify Document Being opened from an Add-In using Auto_Open? Yo Excel Programming 2 January 15th 04 09:38 PM


All times are GMT +1. The time now is 10:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"