Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Locking other Excel sheets from intermingling with my Excel App

Randy -

Prevent other workbooks from running your code by inserting a line like
this around your event procedures:

If ActiveWorkbook.Name = ThisWorkbook.Name Then
' run the code
End If

You could also use an application event class module to show particular
custom commandbar buttons when your workbook is activated, and hide them
when your book is deactivated.

These things will let your workbook coexist peacefully with anyone else's.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
http://www.geocities.com/jonpeltier/Excel/index.html
_______

Randy wrote:
When users open my Excel Application all is ok until they
open another sheet. A few things happen:

1) The new sheet shares the active window of my Excel App.
2) Sometimes based on the event the new sheet calls macros
in my application.

I know I could use Application.IgnoreRemoteRequests=True
to eliminate this completely but if that value is not set
before the app closes it creates a mess will any Excel
sheets the user may wish to open. Not good if a system
crash occurs. So therefore not an option.

What other options do I have? I have been trying all
kinds of things. You would think Excel would have
something that would Make an application a true and
separate application......

Any ideas?

Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Locking other Excel sheets from intermingling with my Excel App

Jon,
Thanks very much for your input on my issue. Sorry it has taken so long
to get back. I have still not been able to try your suggestions, that
will be next week but they make sense. I will let you know how it goes.
Best Regards,
Randy

*** 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
Excel documents keep locking Kevin Excel Discussion (Misc queries) 8 April 9th 08 11:33 AM
Excel Automatically locking sheets after power outage [email protected] Excel Discussion (Misc queries) 2 May 31st 07 11:02 PM
Locking rows in Excel 97 KJo Excel Discussion (Misc queries) 3 May 24th 06 08:52 PM
Locking Sheets / Hiding Sheets Lee Harris Excel Worksheet Functions 4 November 29th 05 07:21 AM
Locking certain sheets Nigel Excel Discussion (Misc queries) 3 May 12th 05 02:28 PM


All times are GMT +1. The time now is 11:59 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"