Well, that was a big help Remou.
Considering I do have a 10 digit Decimal number, trying to convert it to an 8 digit hex number, the help really doesnt answer the question. Is there a limit in regards to the largest number the hex function will convert?
Opps, spoke too soon guys. I am still having the issue. The prev msg was wrong and it is not working as well.
Any ideas per the code in the original message?
I am using this code, and am getting this error.
If Len(txtESNdec) = 18 Then
left10 = Left([txtESNdec], 10)
right8 = Right([txtESNdec], 8)
hexleft = Hex(left10)
hexright = Hex(right8)
hex_number = Format(hexleft, "00000000") & Format(hexright, "000000")
Me.txtESNhex =...
Hey MajP,
Thanks for the input. thanks to all for the assist. Thats what I love about this site, everyone is always willing to lend a helping hand!!
Richard
Hey Aceman,
I know that a leading zero is kind of irreliant, but in my line of work, its required. the number submitted on a form has to be 8 digits and if it starts with a zero, it has to be there. If the ;eading zero isnt there, then the first number or character on the number that actually...
Hey Missingling,
What I ment was that it is a text box, which normally can have a 8 digit number, or a combination of numbers and characters. I guess what I ment was that it is not always just a "number" in that box. I'm still a rookie when it comes to this stuff, so I may not explain clearly...
well, I got around it by saying:
If Len(hex_number) = 7 Then
newhex = "0" & hex_number
Else
nexhex = hex_number
End If
Sometimes I think better in the morning. Thanks for the help!!!
Additional info. Not all conversions start with 0, some start with 1 or 2, etc... Maybe it would be best to check the length of the result, and if less than 8 characters, to add the "0" in front??
thanks again all!
Have a quick question.
Here is a code I am using to convert decimal serial numbers into Hex.
Private Sub txtESNdec_AfterUpdate()
left3 = Left([txtESNdec], 3)
right8 = Right([txtESNdec], 8)
hexleft = Hex(left3)
hexright = Hex(right8)
hex_number = hexleft...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.