Hey all,
Kind of a general syntax question but it's simple enough to explain. This may remind you of the INDIRECT function.
The Brief History:
Somewhere in my current code I have an Object Variable (I'll call "x") that eventually gets assigned an integer value (via a calculation). The code I have so far to get this integer value works great. My question relates to the next step.
By design, the end value for X is actually a row number. For example sake, say the current code ends in setting X = 34. What I'd like to do is use that Object Variable as a way to select a cell in Column B (B34 in this example). How do you code this?
I've tried (with dismal failure) code similar to this:
Range("B:"&X).Select (or)
Range(""B:"&X").Select
...I know I'm missing something really basic - but I'm starting to go NUTS!
Thanks!
Adam S.
Kind of a general syntax question but it's simple enough to explain. This may remind you of the INDIRECT function.
The Brief History:
Somewhere in my current code I have an Object Variable (I'll call "x") that eventually gets assigned an integer value (via a calculation). The code I have so far to get this integer value works great. My question relates to the next step.
By design, the end value for X is actually a row number. For example sake, say the current code ends in setting X = 34. What I'd like to do is use that Object Variable as a way to select a cell in Column B (B34 in this example). How do you code this?
I've tried (with dismal failure) code similar to this:
Range("B:"&X).Select (or)
Range(""B:"&X").Select
...I know I'm missing something really basic - but I'm starting to go NUTS!
Thanks!
Adam S.