ok your idea to get the value of the string.. sort of works...
[code=vb]
Private Sub Form_Load()
hexfinal = "&H0000FFFF "
End Sub
Private Sub L2_Click()
If l2on = False Then
L2.ForeColor = &HFFFFFF
l2on = True
hexfinal = Hex(Val(hexfina l) - &HFFFF0100)
Text1.Text = "0000" & hexfinal
Text2.Text = "0010" & hexfinal
ElseIf l2on = True Then
L2.ForeColor = &H808080
l2on = False
hexfinal = Hex(Val(hexfina l) + Val("&H00000100 "))
Text1.Text = hexfinal
Text2.Text = hexfinal
End If
End Sub
[/code]
that was my last attemp..
the subtraction works.. i get FEFF like i wanted..
put the addition.. always results as the number 100 and not FFFF
[code=vb]
Private Sub Form_Load()
hexfinal = "&H0000FFFF "
End Sub
Private Sub L2_Click()
If l2on = False Then
L2.ForeColor = &HFFFFFF
l2on = True
hexfinal = Hex(Val(hexfina l) - &HFFFF0100)
Text1.Text = "0000" & hexfinal
Text2.Text = "0010" & hexfinal
ElseIf l2on = True Then
L2.ForeColor = &H808080
l2on = False
hexfinal = Hex(Val(hexfina l) + Val("&H00000100 "))
Text1.Text = hexfinal
Text2.Text = hexfinal
End If
End Sub
[/code]
that was my last attemp..
the subtraction works.. i get FEFF like i wanted..
put the addition.. always results as the number 100 and not FFFF
Comment