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 |
Decoding a Range String
Just what I was hoping for. It works.
Thanks John Kauffma ----- Tom Ogilvy wrote: ---- sStr = "B11:Z56 set rng = Range(sStr rng.column ' begin colum rng.Row ' begin ro rng.columns(rng.columns.count).Column ' end colum rng.Rows.(rng.rows.count).Row ' end ro -- Regards Tom Ogilv "John Kauffman" wrote in messag .. Hello I am writing a userform to collect a range from the user, manipulating th 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 i the other worksheets, so I need to decode the "selected range" string int BeginRow, EndRow, BeginColumn and EndColumn. I can imagine an algorithm t do this based on ASC and CHR conversions using the MID function, but wonder it there is an easier way such as an existing VBA function that wil take care of this for me Thanks John Kauffma |
All times are GMT +1. The time now is 11:14 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com