Togglebutton question

Electrocutioner

Member
Licensed User
Longtime User
Following code crashes with Cannot Parse: true as boolean error

Code: Copy
Sub tgl_PWR_CheckedChange(Checked As Boolean)
 
    Select tgl_PWR.Checked
   Case "True" :txtLog.text= "ON"
   Case "False":txtLog.text= "OFF"
   End Select
   
End Sub

Im not sure what is wrong please help.
Thank you!
 
I think you are comparing a boolean value to strings. In the Case, try True, not "True", the same for False.
 
Upvote 0
Back
Top