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: 2,836
Default Count Workbooks that are open; Prevent another from opening

Im running the code from he
http://support.microsoft.com/kb/291295/EN-US/

That works great if I get into the Sub and hit F5! Now, Im trying to think
of a way I can modify this slightly so as to prompt a user that the WB is
already open if they try to open the file again. The file will be saved back
to SharePoint and I want to make sure there is ONE SINGLE incidence of this
Excel WB open at a time (its fine if several other WBs are open).
Basically, I dont want someone to open the file, do some work, walk away,
forget that its open, and try to open it again (from SharePoint).

I think Im going to need something like:
workbook_open (in thisworkbook)

or

workbook_activate (in thisworkbook)

or

AUTO_OPEN (in a module)

I think, for this to work, Im going to have to count the number of WBs open
(with this WB name, right). So,

If count <=1 Then workbook_open
Else call TestFileOpened
End if

Thanks!

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.
 
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
prevent workbook opening if already open by someone else KevHardy Excel Discussion (Misc queries) 0 March 4th 10 10:02 AM
Excel2007; workbooks.count is not counting all open workbooks greg.campeau Excel Programming 2 August 2nd 08 08:37 PM
Workbooks Open = different result than actually opening Workbook Evan McC Excel Programming 2 July 30th 07 01:24 PM
open workbooks when opening an excel file jprogrammer[_11_] Excel Programming 1 May 30th 06 10:18 PM
Is it possible to prevent opening of workbooks in the current instance of Excel? [email protected] Excel Programming 0 January 26th 05 09:41 PM


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