With "72702", if you use CInt() or declare the variable as an Integer, then you will get an overflow error. This is because Integers in VBA are 16-bit and hold whole numbers between -32,768 and 32,767 (inclusive). Declaring the variable as a Long and using CLng() should be fine.
![]()
Sub foo() Dim lngTest As Long lngTest = CLng("72702") End Sub
Bookmarks