corregir errores

03/01/2006 - 20:49 por jorge | Informe spam
Estoy desarrollando un proyecto en vb para diseñar una boleta de notas, y al
iniciarlo me ha mostrado una serie de errores, los cuales quisiera que me
ayuden a corregirlos:


No se ha declarado el nombre 'Round'.
No se ha declarado el nombre 'CAD'.
No se ha declarado el nombre 'ToolTip1',
En QBColor(12) el error manifisesta esto
Un valor de tipo 'Integer' no se puede convertir en '2'.
igual para QBColor(1)


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim n1, n2, n3, pr As Integer
n1 = Val(TextBox4.Text)
n2 = Val(TextBox5.Text)
n3 = Val(TextBox6.Text)
pr = Round((n1 + n2 + n3) / 3, 0)
TextBox7.Text() = Str(pr)
If pr >= 11 Then
TextBox9.Text = "APROBADO"
TextBox9.ForeColor = QBColor(1)
Else
TextBox9.Text = "desaprobado"
TextBox9.ForeColor = QBColor(12)
End If
Select Case pr
Case 1
CAD = "UNO"
Case 2
Cad = "DOS"
Case 3
CAD = "TRES"
Case 4
CAD = "CUATRO"
Case 5
CAD = "CINCO"
Case 6
CAD = "SEIS"
Case 7
CAD = "SIETE"
Case 8
CAD = "OCHO"
Case 9
Cad = "NUEVE"
Case 10
CAD = "DIEZ"
Case 11
CAD = "ONCE"
Case 12
CAD = "DOCE"
Case 13
CAD = "TRECE"
Case 14
CAD = "CATORCE"
Case 15
CAD = "QUINCE"
Case 16
CAD = "DIESISEIS"
Case 17
CAD = "DIESISIETE"
Case 18
CAD = "DIESIOCHO"
Case 19
CAD = "DIESINUEVE"
Case 20
CAD = "VEINTE"
End Select
TextBox8.Text = CAD

Button1.Enabled = True
Button1.Enabled = False

ToolTip1.SetToolTip(Button1, "Hacer un clic para calcular")

End Sub


Haber si me ayudan gracias.
 

Leer las respuestas

#1 Miguel A. Nievas - MCAD.NET
03/01/2006 - 22:31 | Informe spam
Es que no tenes declarado las variables esas.. Ej.. la matriz ROUND no esta
declarada. CAD Tampoco..
Ej: Dim ROUND(10,10) as integer

Atte. Miguel A. Nievas
MCAD.NET

"jorge" wrote:

Estoy desarrollando un proyecto en vb para diseñar una boleta de notas, y al
iniciarlo me ha mostrado una serie de errores, los cuales quisiera que me
ayuden a corregirlos:


No se ha declarado el nombre 'Round'.
No se ha declarado el nombre 'CAD'.
No se ha declarado el nombre 'ToolTip1',
En QBColor(12) el error manifisesta esto
Un valor de tipo 'Integer' no se puede convertir en '2'.
igual para QBColor(1)


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim n1, n2, n3, pr As Integer
n1 = Val(TextBox4.Text)
n2 = Val(TextBox5.Text)
n3 = Val(TextBox6.Text)
pr = Round((n1 + n2 + n3) / 3, 0)
TextBox7.Text() = Str(pr)
If pr >= 11 Then
TextBox9.Text = "APROBADO"
TextBox9.ForeColor = QBColor(1)
Else
TextBox9.Text = "desaprobado"
TextBox9.ForeColor = QBColor(12)
End If
Select Case pr
Case 1
CAD = "UNO"
Case 2
Cad = "DOS"
Case 3
CAD = "TRES"
Case 4
CAD = "CUATRO"
Case 5
CAD = "CINCO"
Case 6
CAD = "SEIS"
Case 7
CAD = "SIETE"
Case 8
CAD = "OCHO"
Case 9
Cad = "NUEVE"
Case 10
CAD = "DIEZ"
Case 11
CAD = "ONCE"
Case 12
CAD = "DOCE"
Case 13
CAD = "TRECE"
Case 14
CAD = "CATORCE"
Case 15
CAD = "QUINCE"
Case 16
CAD = "DIESISEIS"
Case 17
CAD = "DIESISIETE"
Case 18
CAD = "DIESIOCHO"
Case 19
CAD = "DIESINUEVE"
Case 20
CAD = "VEINTE"
End Select
TextBox8.Text = CAD

Button1.Enabled = True
Button1.Enabled = False

ToolTip1.SetToolTip(Button1, "Hacer un clic para calcular")

End Sub


Haber si me ayudan gracias.

Preguntas similares