Function HexToLong(ByVal sHex As String) As Long
HexToLong = Val("&H" & sHex & "&")
End Function
Of course this assumes that the value doesn't have the "&H" before it and the "&" after it. If the value in the text box already has these VB pre- and post-fixes to the number, then you can just do this:
Code:
MyLong = Val(Text1.Text)
Here's an article about this on MSDN (a most valuable resource).