Programación General > Visual Basic 6.0 e inferiores

 Convertir hexadecimal en Decimal.

(1/1)

maxstepin:
hola

teniendo este codigo:


--- Código: Visual Basic ---Function HexToLong(ByVal sHex As String) As Long        HexToLong = Val("&H" & sHex & "&")      End Function Private Sub txtDecimal_Change()    txtHexadecimal.Text = Hex(CLng(txtDecimal.Text)) End Sub Private Sub txtHexadecimal_Change()    'txtDecimal.Text = CLng("&h" & txtHexadecimal.Text)    'Val    txtDecimal.Text = HexToLong(txtHexadecimal.Text) 
Porque no me funciona la linea 'txtDecimal.Text = CLng("&h" & txtHexadecimal.Text) sin tener que invocar a la funcion?
Finaliza con error cunado excedo en digitos tanto en un texbox como el otro.

salud

Navegación

[0] Índice de Mensajes

Ir a la versión completa