Sorry, I was wrong.
You can use 2 buttons ButtonOn and ButtonOff. You can change the state by using a global var then enable/visible it.
However, it's better to use Toggle button like NJDude suggested.
Sub Button1_Click
If Button1.Text="OFF" Then
Button1.Text="ON"
'...Code to turn on whatever
Else
Button1.Text="OFF"
'...Code to turn off whatever
End If
End Sub
Sub Button1_Click
If Button1.Text="OFF" Then
Button1.Text="ON"
...Code to turn on whatever
Else
Button1.Text="OFF"
...Code to turn off whatever
End If
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.