I am given to understand, on good authority, that in VBA the "default character" of a number is LONG. This is to say, EXCEL loves to treat numbers primarily as LONG unless coerced to handle them by an explicit declaration (of INTEGER or DOUBLE). For this reason, and circumstances permitting, declaring any number as LONG causes EXCEL to use memory more efficiently. Which seems to fly in the face of the fact that INTEGER attracts less memory space (2 bytes) than Long (4 bytes). Anyhow, the cut is that if DOUBLE is not required, we would be better off ALWAYS declaring LONG even when INTEGER range is intended.
Can anyone comment on the above before I set the principle in concrete?
davidm
Bookmarks