I'm trying to reference a group of columns based on an incrementing integer variable, and I'm having some trouble selecting them. I have a column counter variable called intColCounter, and I'm using the Columns property the way VBAJedi mentions here: thread707-730362.
The above code keeps generating an "application-defined or object-defined error". I've used this type of referencing with the Rows property and never had a problem, but Columns doesn't seem to be working for me. In fact, if I change the above code to reference rows instead, it works fine. I'm stumped.
Any ideas?
Code:
Columns(intColCounter + 2 & ":" & intColCounter + 10).Select
The above code keeps generating an "application-defined or object-defined error". I've used this type of referencing with the Rows property and never had a problem, but Columns doesn't seem to be working for me. In fact, if I change the above code to reference rows instead, it works fine. I'm stumped.
Any ideas?