Thread: Selection
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Greg Glynn Greg Glynn is offline
external usenet poster
 
Posts: 137
Default Selection

Maybe play around with the CurrentRegion property

Range("C1").Activate
ActiveCell.CurrentRegion.Select

See how you go with that.

Greg

kirke wrote:
I want to select columnes from C to unknown.
Thus, I want to define it like following:

Range("C1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select

However, it doesn't work properly, The result is

Range("C1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select

Thus, I record the macro and replay it. However, also doesn't work.
Sometimes, it works, and suddenly it doesn't work. and that's now. It
makes me crazy !
Is there some setting for using this? Or is there other method?
I always appreciate peoples answer from here! It's really really
helpful!!!!!
Thx.