ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   xlFillFormat to Right (https://www.excelbanter.com/excel-programming/421674-xlfillformat-right.html)

ryguy7272

xlFillFormat to Right
 
How do I use xlFillFormat for 9 columns to the right of my current Column
(which is Column A)?

I have this code:
ActiveCell.Resize(, 9).Select
Selection.AutoFill Destination:=.Range(.Cells(, 9), Type:=xlFillFormats

The second line is failing.
Please help!

Thanks!
Ryan---

--
RyGuy

Gary Keramidas

xlFillFormat to Right
 
maybe this:

Sub test()
With ActiveCell
..AutoFill Destination:=.Resize(, 9), Type:=xlFillFormats
End With
End Sub

--


Gary

"ryguy7272" wrote in message
...
How do I use xlFillFormat for 9 columns to the right of my current Column
(which is Column A)?

I have this code:
ActiveCell.Resize(, 9).Select
Selection.AutoFill Destination:=.Range(.Cells(, 9), Type:=xlFillFormats

The second line is failing.
Please help!

Thanks!
Ryan---

--
RyGuy





All times are GMT +1. The time now is 10:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com