How to program double click of fill handle

  • Thread starter Thread starter Fred Smith
  • Start date Start date
F

Fred Smith

I want to do in VBA the equivalent of double-clicking on the fill handle.

When I record the macro, I get a hard coded range, as in:

Selection.AutoFill Destination:=Range("B2:B15")

I want the range to be a variable length, ie, however many contiguous rows are
in column A. I tried:

Range("B2", Range("A2").end(xldown).offset(0,1))

but I got a two column range out of this rather than one. What range will solve
my problem?
 

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