Datos numericos negativos

Libardo
07 de Noviembre del 2003
Hola, por favor como hago para que un dato de excel
que vale -24.432 , al mostrarlo en una caja de texto de una forma de visual basic aparesca el mismo valor y no -130, que es lo que aparece.
Por favor auxilio

master
07 de Noviembre del 2003
Esta es la solución:

Private Sub limite_Change()
If Option1.Value = True Then
If Check1.Value = 1 Then
limite.Max = Val(Text2.Text)
limite.Min = Val(Text1.Text)
If Val(Text2.Text) < -273 Then
MsgBox "El limite minimo es -273", vbCritical, "Error"
Text2 = ""
Text2.SetFocus
Else
maximo.Caption = Val(Text1.Text)
minimo.Caption = Val(Text2.Text)
temp.Caption = limite.Value
gc.Caption = limite.Value
gf.Caption = (9 / 5) * limite.Value + 32
gk.Caption = 273.15 + limite.Value
gr.Caption = (9 / 5) * limite.Value + 491.67
End If
Else
maximo.Caption = 100
minimo.Caption = 0
limite.Max = 0
limite.Min = 100
limite.LargeChange = 10
limite.SmallChange = 1
temp.Caption = limite.Value
gc.Caption = limite.Value
gf.Caption = (9 / 5) * limite.Value + 32
gk.Caption = 273.15 + limite.Value
gr.Caption = (9 / 5) * limite.Value + 491.67
End If

ElseIf Option2.Value = True Then
If Check1.Value = 1 Then
limite.Max = Val(Text2.Text)
limite.Min = Val(Text1.Text)
If Val(Text2.Text) < -273 Then
MsgBox "El limite minimo es -273", vbCritical, "Error"
Text2 = ""
Text2.SetFocus
Else
maximo.Caption = Val(Text1.Text)
minimo.Caption = Val(Text2.Text)
temp.Caption = limite.Value
gf.Caption = limite.Value
gc.Caption = (5 / 9) * (limite.Value - 32)
gk.Caption = (5 / 9) + 2297 / 9 + limite.Value
gr.Caption = 459.67 + limite.Value
End If
Else
maximo.Caption = 212
minimo.Caption = 32
limite.Max = 32
limite.Min = 212
limite.LargeChange = 10
limite.SmallChange = 1
temp.Caption = limite.Value
gf.Caption = limite.Value
gc.Caption = (5 / 9) * (limite.Value - 32)
gk.Caption = (5 / 9) + 2297 / 9 + limite.Value
gr.Caption = 459.67 + limite.Value
End If

ElseIf Option3.Value = True Then

If Check1.Value = 1 Then
limite.Max = Val(Text2.Text)
limite.Min = Val(Text1.Text)
If Val(Text2.Text) < 0 Then
MsgBox "El limite minimo es 0", vbCritical, "Error"
Text2 = ""
Text2.SetFocus
Else
maximo.Caption = Val(Text1.Text)
minimo.Caption = Val(Text2.Text)
temp.Caption = limite.Value
gk.Caption = limite.Value
gc.Caption = limite.Value - 273.15
gf.Caption = (9 / 5) * limite.Value - 2297 / 5
gr.Caption = (9 / 5) * limite.Value
End If
Else
maximo.Caption = 273.15
minimo.Caption = 0
limite.Max = 0
limite.Min = 273.15
limite.LargeChange = 10
limite.SmallChange = 1
temp.Caption = limite.Value
gk.Caption = limite.Value
gc.Caption = limite.Value - 273.15
gf.Caption = (9 / 5) * limite.Value - 2297 / 5
gr.Caption = (9 / 5) * limite.Value
End If

ElseIf Option4.Value = True Then
If Check1.Value = 1 Then
limite.Max = Val(Text2.Text)
limite.Min = Val(Text1.Text)
If Val(Text2.Text) < 0 Then
MsgBox "El limite minimo es 0", vbCritical, "Error"
Text2 = ""
Text2.SetFocus
Else
maximo.Caption = Val(Text1.Text)
minimo.Caption = Val(Text2.Text)
temp.Caption = limite.Value
gr.Caption = limite.Value
gf.Caption = limite.Value - 459.67
gk.Caption = (5 / 9) * limite.Value
gc.Caption = (5 / 9) * limite.Value - 273.15
End If
Else
maximo.Caption = 459.67
minimo.Caption = 0
limite.Max = 0
limite.Min = 459.67
limite.LargeChange = 10
limite.SmallChange = 1
temp.Caption = limite.Value
gr.Caption = limite.Value
gf.Caption = limite.Value - 459.67
gk.Caption = (5 / 9) * limite.Value
gc.Caption = (5 / 9) * limite.Value - 273.15
End If
End If
End Sub

Private Sub reiniciar_Click()
Unload Me
temper.Show
End Sub





auyeeeeee