I want to create a .vbs file that runs the .xlsm file with administrator privileges.
The method I thought of is
- Run excel file as an administrator
- Open .xlsm file from an Excel opened with administrator privileges
I opened .xlsx as an administrator, but...
Set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "C:\Program Files (x86)\Microsoft Office\Office16\EXCEL.EXE", "" , "", "runas", 0
I cannot control the .xlsx file that I opened as an administrator by GetObject(,Excel.application)
I respectfully ask for your help.