Hi All,

I would like to use macro for the following things in excel.
I have a purchase order form in excel 2007 macro enabled file format.
I've put a button to the form and I'd like to use this button to run the macro.
I know how to assign a macro to button or shortcut.

The user fill the necessary cells and click to the button.

The macro steps are the followings:
1. increase a number PO1000000 in a temp cell H1 (I linked this cell to the final cell because the final cell is protected and as I know the protected cell cannot be modify via macro, and I find only this easiest way)
2. open save as window and the file name filled PO number to an xlsx file format to a fix network directory (for example Z:\PO)
3. clear the macro enabled form except the PO number in H1 cell (because I must keep the latest PO number to ensure that every PO has an unique ID) and the other protected cells and save the cleared macro enabled file

I do not know, how can I handle if more than one user opened the macro enabled form and one of them cannot save the file (because it is read only) but the unique PO number is used for two or more PO's xlsx (so it is not unique).

Thank you.

Regards,
Peter