DESLIGAR WINDOWS XP...
Como faço para desligar o windows xp?
estou fazendo desse jeito, mas esta dando erro... alguém sabe o que é?
Sub ShutXP(Optional Resetar As Boolean = False)
Dim q
If Resetar = False Then
q = Shell("shutdown.exe -s", vbMinimizedFocus)
Else
q = Shell("shutown.exe -r", vbMinimizedFocus)
End If
End Sub If
End Sub
estou fazendo desse jeito, mas esta dando erro... alguém sabe o que é?
Sub ShutXP(Optional Resetar As Boolean = False)
Dim q
If Resetar = False Then
q = Shell("shutdown.exe -s", vbMinimizedFocus)
Else
q = Shell("shutown.exe -r", vbMinimizedFocus)
End If
End Sub If
End Sub
Tente da seguinte forma:
Sub ShutXP(Optional Resetar As Boolean = False)
Dim q
If Resetar = False Then
q = Shell("shutdown.exe -s", vbMinimizedFocus) '(shutdown)
Else
q = Shell("shutown.exe -r", vbMinimizedFocus) '(reboot)
End If
End Sub If
End Sub
Sub ShutXP(Optional Resetar As Boolean = False)
Dim q
If Resetar = False Then
q = Shell("shutdown.exe -s", vbMinimizedFocus) '(shutdown)
Else
q = Shell("shutown.exe -r", vbMinimizedFocus) '(reboot)
End If
End Sub If
End Sub
Só vai funcionar quando você colocar shutdown na linha debaixo, ao invés de shutown e tirar esse End Sub If aÃ...
Tópico encerrado , respostas não são mais permitidas