From TOF : How do I coerce the result of &h into a UInt32 if I already know the value is in the legal range?

Am I confused or isn’t the most simple solution

Var X As UInt32
Var H as String = "&H123456"
X=Val(h)

if “H” isn’t a string then it is already a numeric value, and a simple assignment is all that is required

There are several
Just assign the &h to a Uint32 works too

Dim i As UInt32 = &h1234

Or the use of val as you note