View Single Post
  #7   Report Post  
daniel chen
 
Posts: n/a
Default

Hi David,
I do have Options Explicit at the top on all my macros.
Thanks for this extra info about integer.
I thought Long was for decimal numbers only.

"David McRitchie" wrote in message
...
Hi Daniel,
Good, but it is important to know what was changed and why.

Options Explicit should be at the top of your module from Excel 97 on.
There are 65536 rows in a worksheet so the variable for the
number of rows should be Long as Integer is not large enough.

Sorry that I had not actually tested with the variable as Integer
as that does in fact provide a subscript out of range error.