Hello psanghvi,
The attached workbook contains 2 macros. One is a worksheet change event macro. This macro updates the unprotects the worksheet, updates the PO number, and reprotects the sheet. The PO number is in the cell behind a rectangle shape that displays the PO number. This prevents the user from changing it. If you want to change the PO number, you must first unprotect the worksheet, select the cell F3, and press the left arrow key to select cell E3. After you change the PO number, the sheet protect will be applied again.
The second macro is for the Submit button. This checks that the other workbook is open, all cells have been filled, write the data to the other workbook, and updates the PO number. If there is a problem then the user is notified by a dialog box. Here is the code for both macros.
Worksheet_Change Event Code
Submit Button Macro Code
Bookmarks