Hello, I am using the following .vbs script to open, run, save and quit excel:
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open _
("my_excel_workbook")
objExcel.ActiveWorkbook.Save
objExcel.Quit
What happens in the excel sheet is a macro is initialzied upon opening the file. I have the macro password protected so that it can only run with the password. I was hoping to have the above .vbs script input the password into the following section of code:
Dim password As Variant
password = Application.InputBox("Enter Password", "Password Protected")
Select Case password
Case Is = False
'do nothing
Case Is = "easy"
MY CODE
Case Else
MsgBox "Incorrect Password"
End Select
Any help here would be greatly appreciated. Also, if you have any questions feel free to reach out!
Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open _
("my_excel_workbook")
objExcel.ActiveWorkbook.Save
objExcel.Quit
What happens in the excel sheet is a macro is initialzied upon opening the file. I have the macro password protected so that it can only run with the password. I was hoping to have the above .vbs script input the password into the following section of code:
Dim password As Variant
password = Application.InputBox("Enter Password", "Password Protected")
Select Case password
Case Is = False
'do nothing
Case Is = "easy"
MY CODE
Case Else
MsgBox "Incorrect Password"
End Select
Any help here would be greatly appreciated. Also, if you have any questions feel free to reach out!