Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Special cmdbar button activating Enable Macro dialog
I created a workbook using Excel97 SR2 on Win 2000.
The workbook works just fine on my computer. My user has Excel2k on WinXP. When he clicks on a cmdbar button (to activate a form) he gets the Enable Macro dialog. He has also gotton the message about the workbook being open in another session and is locked for editing. The cmdbar is created using the Workbook Open event. Am using code from this ng that first deletes than creates the cmdbar. Saw something in the ng during the past week (can't find it now) about somehow creating a "ghost" session Excel and am thinking that this might be happening. Does anyone have any clues about this? I'll be glad to post any code (if asked). My code is fairly standard (?) Workbook_Open to create cmdbar Code to clear worksheet Code to display multipage form Code to check finished worksheet for missing input. Thanks in advance for all help... steve |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Special cmdbar button activating Enable Macro dialog
Do you delete the toolbar on the way out (like you do when you open your
workbook)? If no, then the toolbar stays alive even though the workbook is closed. You click on the icon and excel knows where to find that macro--even if xl has to open it! Something like this in the thisworkbook module: Option Explicit Private Sub Workbook_BeforeClose(Cancel As Boolean) On Error Resume Next Application.CommandBars("yourcbar").Delete On Error GoTo 0 End Sub (just like your delete when you start.) steve wrote: Don't know if this has anything to do with this, BUT checked my code and found a large number of Set statements without any Set ..... = Nothing Could these have created the "ghost" connections? steve "steve" wrote in message ... I created a workbook using Excel97 SR2 on Win 2000. The workbook works just fine on my computer. My user has Excel2k on WinXP. When he clicks on a cmdbar button (to activate a form) he gets the Enable Macro dialog. He has also gotton the message about the workbook being open in another session and is locked for editing. The cmdbar is created using the Workbook Open event. Am using code from this ng that first deletes than creates the cmdbar. Saw something in the ng during the past week (can't find it now) about somehow creating a "ghost" session Excel and am thinking that this might be happening. Does anyone have any clues about this? I'll be glad to post any code (if asked). My code is fairly standard (?) Workbook_Open to create cmdbar Code to clear worksheet Code to display multipage form Code to check finished worksheet for missing input. Thanks in advance for all help... steve -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Special cmdbar button activating Enable Macro dialog
Dave,
Thanks for the reply! Your input is Much appreciated! Sorry - I left out that part. Like I said - the code was "stolen" from the ng and does include the delete on workbook close, and before building the cmdbar. I did numerous Set .... = Nothing through out the code and am waiting for my user to get back to me. If this doesn't fix the problem than I'll repost with more pertinent info and I'll try to be more complete in info about the existing workbook. steve p.s. may have sent this before, but am not sure... *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Enable Macros Pop-Up Dialog Box??? | Excel Worksheet Functions | |||
how to disable/enable command button(ActiveX) using macro | Excel Discussion (Misc queries) | |||
HOW TO DO ENABLE ENABLE THE QUERY PARAMETER BUTTON? | Excel Worksheet Functions | |||
activating a command button | Excel Discussion (Misc queries) | |||
Use macro(command button) paste special in 2nd sheet | Excel Worksheet Functions |