Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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
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
Enable Macros Pop-Up Dialog Box??? Jay Excel Worksheet Functions 8 March 18th 13 08:30 AM
how to disable/enable command button(ActiveX) using macro enahs_naneek Excel Discussion (Misc queries) 1 February 5th 10 12:32 PM
HOW TO DO ENABLE ENABLE THE QUERY PARAMETER BUTTON? CPW Excel Worksheet Functions 1 January 21st 10 06:31 PM
activating a command button chuck Excel Discussion (Misc queries) 1 September 10th 09 03:12 AM
Use macro(command button) paste special in 2nd sheet deen Excel Worksheet Functions 5 February 25th 08 01:04 PM


All times are GMT +1. The time now is 04:09 AM.

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

About Us

"It's about Microsoft Excel"