LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default repost: error 'document already opened'

Trying to run a macro from a custom toolbar I get the error
"A document with the name "myworkbook" is already open. You cannot open two
documents .....blah,blah,blah.
This error is happening w/ my custom toolbar. I have a few macros that run
from ToolMacro ,a custom menu bar item and a custom toolbar just fine.
But, if I save the workbook w/ SaveAs to another directory (same filename)
for backup I cause a problem. When I re-open the original workbook and try
to run macros from the custom toolbar I get the above error. It's because
the path has been changed and points to the directory where the backup was
put. This doesn't affect the macro, nor running the macros from the menu bar
.. Just the custom toolbar. I have the following code for opening the toolbar
w/ Workbook_Open event

With Application
.CommandBars("BudgetBar").Visible = True
additional code
end with

and this with Workbook_BeforeClose
Application.CommandBars("BudgetBar").Visible = False

I'm thinking it's because the object is Application and should be something
smaller (workbook?) but I"m obviously confused and any and all help is
always appreciated.
--
jeff



 
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
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
Error document already opened jeffP Excel Programming 3 August 4th 04 03:08 AM
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 09:34 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"