Am getting a runtime error: btnSender (Button) Not initialized, for the below code.
FYI, this is the exact piece of code from the 'Beginners Guide'.
Sub btnEvent_Click
Dim btnSender As Button
btnSender = Sender
Select btnSender.Text
Case "BS"
If lblResult.Text.Length > 0 Then
lblResult.Text = lblResult.Text.SubString2(0, lblResult.Text.Length - 1)
End If
Case Else
lblResult.Text = lblResult.Text & btnSender.Text
End Select
Could you please help! thanks!
FYI, this is the exact piece of code from the 'Beginners Guide'.
Sub btnEvent_Click
Dim btnSender As Button
btnSender = Sender
Select btnSender.Text
Case "BS"
If lblResult.Text.Length > 0 Then
lblResult.Text = lblResult.Text.SubString2(0, lblResult.Text.Length - 1)
End If
Case Else
lblResult.Text = lblResult.Text & btnSender.Text
End Select
Could you please help! thanks!