Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Max Number of Users | Excel Discussion (Misc queries) | |||
Number of Multi-users | Excel Discussion (Misc queries) | |||
Finding unique names--then converting those names to unique number | Excel Discussion (Misc queries) | |||
Startup and template locations in Citrix TS session and local session | Setting up and Configuration of Excel | |||
Can I email unique worksheets from a workbook to different users? | Excel Discussion (Misc queries) |