开机是无法做得,关机代码如下Private Sub command1_click()Shell "Shutdown -s -t 10" '延迟10秒关机End Sub
CheckBox 或 CommandButton 实现