View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Chrissy[_4_] Chrissy[_4_] is offline
external usenet poster
 
Posts: 101
Default Using object Range dynamic???

Did you try what I posted?

Chrissy.

Peter wrote

I have now tried a couple of different things as seen
below, but I get errors.

Try1:
Range("A1:C1").Select
Selection.AutoFill Destination:=Range("A1", Cells
(Rows.Count, 3).End(xlUp)), Type:=xlFillDefault
Range("A1", Cells(Rows.Count, 3).End(xlUp)).Select

Try2:
Dim rng As Excel.Range

With Worksheets("Sheet1")
Set rng = Range("A1", Cells(Rows.Count, 3).End(xlUp))
End With

Range("A1:C1").Select
Selection.AutoFill Destination:=Range(rng),
Type:=xlFillDefault
Range("A1:C622").Select