Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fill other columns slavenp Excel Discussion (Misc queries) 3 October 24th 08 02:49 PM
Fill down two columns...C & D J.W. Aldridge Excel Programming 4 July 23rd 08 10:31 PM
fill in columns widman Excel Discussion (Misc queries) 1 October 16th 06 12:52 AM
Dynamic fill of columns Jose Lopes Excel Worksheet Functions 0 March 28th 06 10:07 PM
How would I fill a several columns with the value in the first row BruceJ[_2_] Excel Programming 3 September 24th 03 01:45 AM


All times are GMT +1. The time now is 09:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"