Selecting a variable range
Hi Group,
I'm trying to select a range using VBA which is dependent on the values held
in two named ranges within the main workbook.
These named ranges are "Rows" and "Columns". The idea is that starting from
a defined startpoint (Cell C4), the VBA allows a selection from C4 to, for
example E6. To allow me to do this, I've tried using the R1C1 format and
come up with the following...
ActiveWorkbook.Range(RefersToR1C1:="R4C3" & ":R" & "rows" & "C" &
"Columns").Select
As I guess you realise due to my posting here, it doesn't work. In the above
example, the value in "Rows" would be 6 and "Columns" would be 5 (to give
E6).
Any suggestions would be welcome.
Regards
Colin Foster
|