My company is now using Microsoft 2010. First let me say I have no experience in writing macros or VBA Project. I copied a code from a forum that worked to provide auto numbering to our Excel Travel & Expense form. I would like to save the Excel template/or spreadsheet on our common drive forcing users to open (to get the auto number) and save a copy each time to their H:\drive. Once the file is saved on the H:\ drive the auto number needs to be turned off. This would allow the user to continue editing the document if necessary and to avoid duplicate numbering. Can anyone help me write a code? Below is what I have to turn the auto numbering on. I also need to protect certian fields in the document from being type in.
Private Sub Workbook_Open()
With Range("J5")
.NumberFormat = "0000000"
.Value = .Value + 1
End With
End Sub
Bookmarks