Debugging a simple VBA command
Budget: £10 – £20 GBP
I am trying to use the following VBA code in a range of spreadsheets.
The purpose of the code is to automate the saving / adding of a password to modify
This is performed using a macro button.
The code is simple:
ThisWorkbook.SaveAs writeResPassword:="123"
Problem:
This works in some workbooks but not others!
I think the problem is how I'm creating and assigning the macro button
When I run the VBA directly from VBA Module, it runs fine.
When I run the VBA by clicking on the macro button, it saves the file, but NOT with the password.
The purpose of the code is to automate the saving / adding of a password to modify
This is performed using a macro button.
The code is simple:
ThisWorkbook.SaveAs writeResPassword:="123"
Problem:
This works in some workbooks but not others!
I think the problem is how I'm creating and assigning the macro button
When I run the VBA directly from VBA Module, it runs fine.
When I run the VBA by clicking on the macro button, it saves the file, but NOT with the password.