Gentlemen, a tip of the day to keep things operating optimally. Whenever you declare a variable without a category, Excel defaults to the most expensive category of all, VARIANT. Mostly, I suppose that's fine, but as a general rule you want to qualify your variables to the least expensive and accurate category.
For loops, rows, columns, the safest choice is LONG as it only allows whole numbers and up to 2.4 million of them in Excel 2003, so plenty of room without teh expense of VARIANT. So declare them fully at the top like so:
========
OutThere, if that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].
Also, be sure to fill out your profile so people will be able to see what version of Excel you're using without having to ask all the time.
(Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated)
Bookmarks