I'm creating a PO Form for our company. I have most things working perfectly: a button to save the form exports it as a pdf and then clears all data and assigns the next number and a button to clear the form does just that and assigns the next number. I have numerous cells locked and password protected so no one can change the form or fudge the numbers. However I want to have a new PO Number automatically assigned and all data cleared upon either (preferably) close or open of the PO Form with a confirmation message saying so. And I want the workbook to automatically save without giving the option.
I'm very new to macros and have built my code so far from the help of this forum and other Google searches. I am trying this "BeforeClose" under "ThisWorkbook" but the dubugger hates my lines to change the value of a cell (H3) and ClearContents of my main worksheet. I've tried "Worksheet("PO Form").Range(etc" but it didn't work wither. Help would be appreciated.
Bookmarks