Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default muliple users - issue unique session number


I have a data entry form which, every time it is started by a user,
needs a unique session number. For this I included a procedure that
opens a separate xls file (numbers.xls), in which the unique numbers
are stored. Every time my form starts up, numbers.xls is openened, and
a new, unique number is issued for the session. This new number is the
highest existing number in numbers.xls, raised by1. This new highest
number is then stored in numbers.xls, afther which numbers.xls is saved
and closed.
The problem occurs when different users start up the form at the more
or less the same time: the second one to open the form, actually opens
a copy of the xls file, so that both users have the same session number
(I noticed that the second user does get the 'file will be opened as
read only' message, but it appears behind the form).
How can I ensure that a new number is not issued befor the previous
user has closed and saved the file? (or provide the users with a unique
session number in another way) ?
greetings from jurjen


--
jurjen
------------------------------------------------------------------------
jurjen's Profile: http://www.excelforum.com/member.php...o&userid=26919
View this thread: http://www.excelforum.com/showthread...hreadid=401413

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default muliple users - issue unique session number

Test the read-only property of the workbook, and loop closing and opening
until False.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"jurjen" wrote in
message ...

I have a data entry form which, every time it is started by a user,
needs a unique session number. For this I included a procedure that
opens a separate xls file (numbers.xls), in which the unique numbers
are stored. Every time my form starts up, numbers.xls is openened, and
a new, unique number is issued for the session. This new number is the
highest existing number in numbers.xls, raised by1. This new highest
number is then stored in numbers.xls, afther which numbers.xls is saved
and closed.
The problem occurs when different users start up the form at the more
or less the same time: the second one to open the form, actually opens
a copy of the xls file, so that both users have the same session number
(I noticed that the second user does get the 'file will be opened as
read only' message, but it appears behind the form).
How can I ensure that a new number is not issued befor the previous
user has closed and saved the file? (or provide the users with a unique
session number in another way) ?
greetings from jurjen


--
jurjen
------------------------------------------------------------------------
jurjen's Profile:

http://www.excelforum.com/member.php...o&userid=26919
View this thread: http://www.excelforum.com/showthread...hreadid=401413



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default muliple users - issue unique session number


thanks! The read-only check is what I needed
cheers,
jurjen


--
jurjen
------------------------------------------------------------------------
jurjen's Profile: http://www.excelforum.com/member.php...o&userid=26919
View this thread: http://www.excelforum.com/showthread...hreadid=401413

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
Max Number of Users Jason D. Miller[_2_] Excel Discussion (Misc queries) 0 December 2nd 09 06:36 PM
Number of Multi-users SW Excel Discussion (Misc queries) 2 March 26th 09 07:38 PM
Finding unique names--then converting those names to unique number Proton Excel Discussion (Misc queries) 7 June 13th 07 10:22 PM
Startup and template locations in Citrix TS session and local session John Nurick Setting up and Configuration of Excel 2 September 21st 06 10:42 PM
Can I email unique worksheets from a workbook to different users? Laura Excel Discussion (Misc queries) 1 November 18th 05 09:52 PM


All times are GMT +1. The time now is 03:54 PM.

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"