|
-
Apr 28th, 2010, 10:17 AM
#1
Thread Starter
New Member
'Unhandled exception: Cast from string "click" to type 'integer' is not valid
Thanks for helping me out: VB 2003
Combobox collection from -3 to +3
The goal of the message is to warn the user that the systems only covers +- 3 timezones, if he types in for example +4 or -4, he gets the message (by the way: how to protect the system if he types for instance a character?)
When I run the application: 'Unhandled exception: Cast from string "click" to type 'integer' is not valid
Private Sub ComboBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.TextChanged
'if more more than 3 timezones
Dim utc As Integer
utc = ComboBox1.Text
If utc < -3 > 3 Then
MsgBox("Calculations only for maximum 3 Time Zones", MsgBoxStyle.OKOnly, "Info")
ComboBox1.Text = 0
End If
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|