I have the following issue:
I created an Excel sheet in XLSB format.
To protect that sheet, password generated by performing some operations on present month and year which would be a numeric value.
Used input box to get a password from the user in a string variable.
step 2 and 3 done in workbookopen event.
I closed the workbook and when again opened was prompted for the password which would never match even though I know the password.
What to do now? I have tried disabling macros but it doesn't seem to work.
finally tried following command
Application.EnableEvents = False
Which does exactly what i want but is not working for my sheet, though same is working fine for another trial sheet.
Sub disableCtrEvents()
Application.EnableEvents = False 'disable Events
Workbooks.Open "<path>\Wall area.xlsb"
Workbooks.Open "<path>\STAAD to steel drawing.xlsb"
End Sub
Following three files can be dowloaded from the link
test.xlsm - containing events disabling code (written above) and code to open other two sheets.
wall area.xlsb - trial sheet to check whether events are disabled or not.
STAAD to steel drawing.xlsb - actual file wherein i want to disable workbook open event
link - https://drive.google.com/open?id=1d_3Tu_-qIYErgYVkOjrCP4b8sZagXxF1