jproj
Chemical
- Oct 9, 2001
- 324
I have an excel spreadsheet in which I would like to restrict the saving of any changes (make it password protected when save or saveas is activated). I have no problem with the code when using an inputbox as the user interface for the password, except that the password is visable when one types. Thus I have created a userform to mimic the inputbox (thereby concealing the password with the "PasswordChar" property).
The problem I have is transfer of information between my userform and the BeforeSave workbook event sub procedure. If the password is incorrect, or if the user clicks "Cancel", I don't want the spreadsheet to be saved. Does anyone know how I can reference the result of my userform activities in my event sub procedure?
Sorry if this is confusing. I'll be glad to clarify if needed. Thanks in advance!!
Best regards,
jproj
The problem I have is transfer of information between my userform and the BeforeSave workbook event sub procedure. If the password is incorrect, or if the user clicks "Cancel", I don't want the spreadsheet to be saved. Does anyone know how I can reference the result of my userform activities in my event sub procedure?
Sorry if this is confusing. I'll be glad to clarify if needed. Thanks in advance!!
Best regards,
jproj