how to run powershell script through excel VBA
If your file path has spaces you need to put quotes around it.
x = Shell("POWERSHELL.exe -noexit " & _ """H:\Operations\REPORTS\Reports2018\Balance Sheet\SLmarginJE.ps1""", 1)
If your file path has spaces you need to put quotes around it.
x = Shell("POWERSHELL.exe -noexit " & _ """H:\Operations\REPORTS\Reports2018\Balance Sheet\SLmarginJE.ps1""", 1)