Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VBA cannot dim a UInteger

I try to dim an unsigned integer using the line:

dim curStart as UInteger

and on running, I receive the error:

Compile Error "User-defined type not defined"

Is there a reference library that is required in VBA to allow unsigned integers?

I'm using Visual Basic for Applications 7.1.1068

like image 759
ericauv Avatar asked Feb 24 '26 04:02

ericauv


1 Answers

You’re out of luck - VBA does not support unsigned types.

Use a Long instead, which is a superset of a 16 bit unsigned type.

like image 191
Bathsheba Avatar answered Feb 27 '26 01:02

Bathsheba



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!