View Single Post
 
Old 05-12-2012, 04:23 AM
cplmckenzie cplmckenzie is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Apr 2012
Posts: 4
cplmckenzie is on a distinguished road
Default

WMGetz,
As to the error msg. Excel is telling you that the document is already opened.
The first user to open a worksheet opens it "edit - read/write mode"

Any subsuquent users can only open the same worksheet in "read only mode".

The underlying form code can be modified to check if the sheet is already opened,
if it is then the code should skip trying trying to open it.

If there is a possibility, either intentionally or inadvertently, that this could be
already opened the code should be modified to address this case.

As to the overwriting of the same data.

This was coded as a example of how to accomplish your objective.

The same code can be used to write all data into sequential rows in the sheet.
The variable that holds the value of the row to write to need to keep state.

Meaning it needs to know the next empty row in each sheet, Central -Northeast and West.
Then assign that value to the variable.

This could be accomplished in a number of ways.
The simplest way would be to use cells in the sheet to hold that value and then test
if that value is greater than "0", if it is assign that value to the variable "rw".

At the end of the code that processes the sheets, simply save the work sheet which has the values of next empty row saved to it

cplmckenzie
Reply With Quote