spacelord009
New Member
- Joined
- Jun 27, 2013
- Messages
- 1
Hi could anybody help here. I cannot find the right solution for this error message
Excel 2010 - execute powershell commands with button
Row13, column 2 enable-mailbox -identity user1 -Alias user1
Runtime error 424 Object missing
Excel 2010 - execute powershell commands with button
Row13, column 2 enable-mailbox -identity user1 -Alias user1
Code:
Sub button9_click()
Counter = 13
Do
Command = Worksheets("EX2010 Commands").Cells(Counter, 2).Value
Shell ("C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -noexit iex " & Command)
Counter = Counter + 1
Loop Until Command = ""
End Sub
Runtime error 424 Object missing