LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 95
Default Limiting number of users opening Excel Workbook at one time.

tricky!
What you can try is to use a markerfile (with just one number, ie the number
of current users).
Look under help under "Write" and "Get" how to manage input files.
If you include some VB code in Workbook_Open and Workbook_BeforeClose then
you can use the markerfile as a counter.
Something like

Type Record ' Define user-defined type.
ID As Integer
Name As Integer
End Type

Dim MyRecord As Record, Position ' Declare variables.

' Open sample file for random access.
Open "TESTFILE" For Random As #1 Len = Len(MyRecord)
' Read the sample file using the Get statement.
Position = 1 ' Define record number.
Get #1, Position, MyRecord ' Read third record.

'which will give the variable MyRecord the number in the file
'Now check
if MyRecord 4 then
msgbox("to many users, file will autoclose")
application.close
end if

Write #1, MyRecord + 1

Close #1 ' Close file


in the Workbook_BeforeClose include a similar statement....

"RickatMDG" wrote:

We are trying to limit the number of users that are able to open and work on
an Excel Workbook at the same time to one at a time. Is there a way to
configure the sheets to do this?


 
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
Long delay opening a workbook through our Intranet for some users Jacques Trépanier Links and Linking in Excel 0 April 20th 07 08:58 PM
Limiting Number of Times a Workbook can be Opened Dan R Excel Worksheet Functions 1 February 13th 07 03:28 PM
Hidding the formula and limiting users bimseun Excel Discussion (Misc queries) 1 April 4th 06 10:45 AM
Can Excel automatically assign a number when opening a workbook? flowbee Excel Discussion (Misc queries) 1 January 11th 06 06:40 PM
Excel workbook to be used by multiple users at same time....possible??? malik641 Excel Worksheet Functions 1 June 26th 05 01:45 AM


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