View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Charlie[_9_] Charlie[_9_] is offline
external usenet poster
 
Posts: 6
Default AutoFill columns

Thanks

"Bob Phillips" wrote in message
...
Selection.AutoFill Destination:=Range("D1").Resize(1, 4).EntireColumn,
Type:=xlFillDefault

although, as the source and initial destination are the same why not use

Dim myRange As Range
Set myRange = Selection.EntireColumn
myRange.AutoFill Destination:=myRange.Resize(1, 4).EntireColumn,
Type:=xlFillDefault

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Charlie" wrote in message
...
Is there a way I can specify a starting column and number of columns in

the
following statement:

Selection.AutoFill Destination:=Columns("D:H"), Type:=xlFillDefault

Starting column is D
Number of colums?