strongm, I think "&H" must be provided. Otherwise VB does not know whether the source number is decimal, hexadecimal or octal. Consider the following example.
___
Dim HexNum As String, DecNum As Long
DecNum = 60
HexNum = Hex$(DecNum)
MsgBox HexNum 'Says 3C
DecNum = Val(HexNum)
MsgBox DecNum 'Says 3 ignoring C (wrong)
DecNum = Val("&H" & HexNum)
MsgBox DecNum 'Says 60 (correct)
___
For me, the simplest way to convert a hex or oct number to its decimal is this;
___
Dim HexNum As String, OctNum As String, DecNum As Long
HexNum = "EC"
DecNum = "&H" & HexNum
MsgBox DecNum '236
'Similarly,
OctNum = "46"
DecNum = "&O" & OctNum
MsgBox DecNum '38