Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
xlFillFormats; Fill 9 Columns to the Right
I'm not sure why my last post didn't show up; trying again:
ActiveCell.Resize(, 9).Select 'Selection.AutoFill Destination:=.Range(.Cells(, 9), Type:=xlFillFormats This code fails on the second line (that's why it is commented out). How can I make it run? Thanks, Ryan--- -- RyGuy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
xlFillFormats; Fill 9 Columns to the Right
Try something like this.
Option Explicit Sub test() Dim myWS As Worksheet Dim SourceRange As Range Dim FillRange As Range Set myWS = Worksheets("Sheet1") Set SourceRange = myWS.Range("A1:A2") Set FillRange = myWS.Range("A1:A20") SourceRange.AutoFill Destination:=FillRange, Type:=xlFillFormats End Sub -- HTH, Barb Reinhardt If this post was helpful to you, please click YES below. "ryguy7272" wrote: I'm not sure why my last post didn't show up; trying again: ActiveCell.Resize(, 9).Select 'Selection.AutoFill Destination:=.Range(.Cells(, 9), Type:=xlFillFormats This code fails on the second line (that's why it is commented out). How can I make it run? Thanks, Ryan--- -- RyGuy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Fill other columns | Excel Discussion (Misc queries) | |||
Fill down two columns...C & D | Excel Programming | |||
fill in columns | Excel Discussion (Misc queries) | |||
Dynamic fill of columns | Excel Worksheet Functions | |||
How would I fill a several columns with the value in the first row | Excel Programming |