Testing vars in intermeditate window

Joined
Jun 22, 2009
Messages
2
Programming Experience
Beginner
Hi Guys,

Kind of new to this. Running through some basic tutorials and wanted the test the value of a variable i have created. How do I go about doing this in the intermediate window??

The only way I can do this is by creating a msgbox and then outputing the string var in the msgbox (var) to get the value I am after. Is there a way of doing this in the intermediate window??

I tried the following. but had no luck...

? ckstatevar


My code is as follows:

Private Sub ckboxDexter_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ckboxDexter.CheckedChanged
Dim ckstatevar As Single = ckboxDexter.CheckState

If ckstatevar = 1 Then
MsgBox("checkstate is one")
ElseIf ckstatevar = 0 Then
MsgBox("checkstate is nothing")
End If

End Sub

Can someone tell me what I am doing wrong?

Cheers
Shock
 
Your code has to have stopped execution for you to use the Immediate window. For that you would normally set a breakpoint (F9), but you can also click the Break button on the tool bar or use the Stop keyword in code.
 
You can also set breakpoints by clicking the grey area next to the line numbers where the breakpoint's red circular button would appear
 
ps; the locals window is easier to use than the Immediate window, for simple variable value checking
 
Back
Top