hatman
Well-known Member
- Joined
- Apr 8, 2005
- Messages
- 2,664
I did what you are never ever supposed to do: I mixed my Data in with my Application.
What started out as a quick and dirty tool for me and a couple of co-workers 2 years ago, has evolved into a massive VBA heavy application that simply has a bunch of dumb data sitting on a series of sheets. Now, upper management wants this thing to be opened up for use by the entire department... several dozen people at present, possibly as many as several hundred in the near future.
The data needs to be maintainable by all of the users. Currently, when a user initiates a database maintanence activity, the macro checks to see if the workbook is ReadOnly, if it is, then a message pops up telling the user to close and re-open in Write Mode. If the workbook IS in write-mode, then the new data is written to a sheet, and the file is saved (this is the ONLY access the user has to actually save this file). This works fine for the 2 users who play with this now... but not so much with many more possibly simultaneous users. (and don't forget the people who open the file at 7:00am, and leave it open at their desktop until 6:00 pm while they are in meetings all day)
My initial thought was to simply have everyone open the file as readonly... then on the rare occassion that someone makes a change to the database, simply change the FileAccess, save the file, and change it back. Probably generate a dummy text file in the same folder for the period of time while the file is not readonly, to prevent another user from trying access it at the same time. I have the whole system all planne dout for manageing save requests... what I can't seem to be able to do is change a Readonly file to Write. I have tried using SetAttr, ChangeFileAccess, and the FileSytemObject unsuccessfully. I think that the FileSystemObject has the most potential... but I simply don't have enough command of it's usage to make this thing happen.
Moving the data into an Access or Oracle database is not a viable option at this point. Does anyone have any other advice?
What started out as a quick and dirty tool for me and a couple of co-workers 2 years ago, has evolved into a massive VBA heavy application that simply has a bunch of dumb data sitting on a series of sheets. Now, upper management wants this thing to be opened up for use by the entire department... several dozen people at present, possibly as many as several hundred in the near future.
The data needs to be maintainable by all of the users. Currently, when a user initiates a database maintanence activity, the macro checks to see if the workbook is ReadOnly, if it is, then a message pops up telling the user to close and re-open in Write Mode. If the workbook IS in write-mode, then the new data is written to a sheet, and the file is saved (this is the ONLY access the user has to actually save this file). This works fine for the 2 users who play with this now... but not so much with many more possibly simultaneous users. (and don't forget the people who open the file at 7:00am, and leave it open at their desktop until 6:00 pm while they are in meetings all day)
My initial thought was to simply have everyone open the file as readonly... then on the rare occassion that someone makes a change to the database, simply change the FileAccess, save the file, and change it back. Probably generate a dummy text file in the same folder for the period of time while the file is not readonly, to prevent another user from trying access it at the same time. I have the whole system all planne dout for manageing save requests... what I can't seem to be able to do is change a Readonly file to Write. I have tried using SetAttr, ChangeFileAccess, and the FileSytemObject unsuccessfully. I think that the FileSystemObject has the most potential... but I simply don't have enough command of it's usage to make this thing happen.
Moving the data into an Access or Oracle database is not a viable option at this point. Does anyone have any other advice?