Selection

  • Thread starter Thread starter kirke
  • Start date Start date
K

kirke

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.
 
Maybe play around with the CurrentRegion property

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

See how you go with that.

Greg
 
Yes. It works.
However, I miss something. I have another data on column A and B which
don't want to be selected.
Thx.
 
Thx! This perfectly work!

Well then, don't you the reason know why mine doesn't work? it looks
similar with yours~~
 
try using usedRane. You can read about it more in help section.

Worksheets("Sheet1").Activate
ActiveSheet.UsedRange.Select
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top