Hi,
Can anyone share idea about using macro file by many user?
I have the macro template that can generate running invoice number and then save the template with new running no. The problem is that when there is more than one user open this template, the running number can be run but cannot save because another person is opening and the second person is on read-only mode. I know this can be best if I have access to store all data but at the moment the access is not available to use yet.
I cannot allow this template to be saved as new file once it is opened because it's required some fields before user can save it which it takes a while to do so. Thing is, it always possible that the second person will open this just right after the first person opens the template.
Private Sub Workbook_Open()
Sheets("Sheet1").Select
ActiveSheet.Unprotect Password = "0000"
Range("C56").Value = Range("C56").Value + 1
ActiveSheet.Protect Password = "0000", DrawingObjects = True
Application.EnableEvents = False
ActiveWorkbook.Save
Application.EnableEvents = True
End Sub
Please help
Bookmarks