Visual Studio 2015
Publicado por Carlos (4 intervenciones) el 16/05/2018 14:14:00
Buenas podran ayudarme con este error,
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
If ComboBox1.SelectedValue = "Loto Activo" Then
Dim valhora As String
Dim horasist As String
horasist = Hora.Text
valhora = ComboBox2.SelectedValue
If valhora = horasist Or valhora < horasist Then
MsgBox("Sorteo culminado, seleccione otra hora", vbCritical)
ComboBox2.Focus()
Else
If Val(TextBox3.Text) >= 500 Then
Dim items As New ListViewItem(TextBox2.Text$)
items.SubItems.Add(ComboBox1.SelectedValue)
items.SubItems.Add(ComboBox2.SelectedValue)
items.SubItems.Add(TextBox3.Text$)
items.SubItems.Add(TextBox6.Text$)
ListView1.Items.Add(items)
' sumas totales
TextBox6.Text = Sumar()
'fin sumas
'vacia info
TextBox2.Clear()
ComboBox1.SelectedValue = 0
ComboBox2.SelectedValue = 0
ComboBox3.SelectedValue = 0
ComboBox1.Enabled = False
ComboBox2.Enabled = False
TextBox3.Clear()
TextBox3.Enabled = False
TextBox1.Focus()
Button3.Enabled = True
Else
MsgBox("Apuesta minima 500 Bs.", vbExclamation)
End If
End If
End If
NOta; de aqui hasta arriba funciona bien.... el promema lo genera es hacia abajo, al seleccionar la granjita avanza sin problema al combobox3 (Contiene una hora a compara con la del sistema) me arroja la falla de la imagen al presionar button 5... como si no hubiese seleccionado valor alguno generando el error que el mismo debe ser un valor menor a infinito
If ComboBox1.SelectedValue = "La Granjita" Then
Dim valhora As String
Dim horasist As String
horasist = Hora.Text
valhora = ComboBox3.SelectedValue
If valhora = horasist Or valhora < horasist Then
MsgBox("Sorteo culminado, seleccione otra hora", vbCritical)
ComboBox2.Focus()
Else
If Val(TextBox3.Text) >= 500 Then
Dim items As New ListViewItem(TextBox2.Text$)
items.SubItems.Add(ComboBox1.SelectedValue)
items.SubItems.Add(ComboBox3.SelectedValue)
items.SubItems.Add(TextBox3.Text$)
items.SubItems.Add(TextBox6.Text$)
ListView1.Items.Add(items)
' sumas totales
TextBox6.Text = Sumar()
'fin sumas
'vacia info
TextBox2.Clear()
ComboBox1.SelectedValue = 0
ComboBox2.SelectedValue = 0
ComboBox3.SelectedValue = 0
ComboBox1.Enabled = False
ComboBox3.Enabled = False
TextBox3.Clear()
TextBox3.Enabled = False
TextBox1.Focus()
Button3.Enabled = True
Else
MsgBox("Apuesta minima 500 Bs.", vbExclamation)
End If
End If
End If
End Sub
Valora esta pregunta
0