A 16-bit field can either store a straight (non-signed) 16 bit integer (0 to 65535) or a signed integer ( that's 1 sign bit plus a 15 bit number (0 to 32767)).
Most VB stuff uses signed numbers, so if you overrun from 32767, the number will be displayed as a negative value.
Negative numbers are stored as 1's complements. This means that -1 returns &HFFFF, and why vb5prgrmr gets -25535 as his listcount.
&HFFFF is 65535, add the 1 to get 65536 (2^16)
40001 (actual listcount) add 25535(as displayed) gives 65536 also Let me know if this helps
________________________________________________________________
If you are worried about how to post, please check out FAQ222-2244 first
'There are 10 kinds of people in the world: those who understand binary, and those who don't.'