Decoding a Range String
sStr = "B11:Z56"
set rng = Range(sStr)
rng.column ' begin column
rng.Row ' begin row
rng.columns(rng.columns.count).Column ' end column
rng.Rows.(rng.rows.count).Row ' end row
--
Regards,
Tom Ogilvy
"John Kauffman" wrote in message
...
Hello.
I am writing a userform to collect a range from the user, manipulating the
selected array of data, and then generating the results in other worksheets.
I need to use the selected string to decide which columns to manipulate in
the other worksheets, so I need to decode the "selected range" string into
BeginRow, EndRow, BeginColumn and EndColumn. I can imagine an algorithm to
do this based on ASC and CHR conversions using the MID function, but I
wonder it there is an easier way such as an existing VBA function that will
take care of this for me.
Thanks,
John Kauffman
|