Re: Range Return (ECXCEL)
Hi,
You could use the Row and Column properties of the returned Cell object to figure out if they are in sequence, then construct a range from that.
I'm thinking something along the lines of putting the checker in a loop which identifies the row and column of the next Cell in the list - if neighbouring then stay in the loop and check for the next item, if not then end the current "range" and start another.
Does that make sense?
zaza
Re: Range Return (ECXCEL)
I had thought of that.. but wanted to see if there is an Easier solution ;)
Thanks!
Re: Range Return (ECXCEL)
ok, I got it :)
by setting the print area it figures the ranges correctly..
then I can just split it up how I want...
and reset the print area
VB Code:
'other code...
WS.Activate
WS.Range(tmpRange).Select
tmpPA = WS.PageSetup.PrintArea
WS.PageSetup.PrintArea = Selection.Address
tmpRange = ActiveSheet.PageSetup.PrintArea
WS.PageSetup.PrintArea = tmpPA
'other code...