I have a password protected excel file that I need to use in a macro, but I am afraid that the password will change from month to month. In order to access the file, I would like to create a user form to enter the password each time the macro is run. Here are my objectives for this sub:
- Select the file to open
- Enter the password in a user form (If the file is protected)
- Open the file using the selected path and password.
I can complete steps 1 and 3 on their own, but I am not sure how to incorporate the user form into this sub. How would you solve this problem?