|Oke i know this sounds a bit basic but have you checked for spaces? strings are quite picky with those. "0 " is not the same as "0" for them. tough its likely a human will read over that last space.
you could add a replace to the .text to get rid of this problem.
If Button1.Text.Replace(" ","") = "1" then
Button1.Text = "0"
Elseif Button1.Text.Replace(" ","") = "0" then
Button1.Text = "1"
EDIT: oke reading some more and i hear some rumors that your using several threads. if this thing is executed in a thread you might want to enforce the update to your gui.
Private Sub updateUI()
If Me.InvokeRequired Then
Me.Invoke(New MethodInvoker(AddressOf updateUI))
if your using that button thing in a sub/background thread then add the above sub and try calling it after the button event is done. be aware that this isn't good code and will enforce a full refresh of your screen, its a nice way to test tough.