Atofill Questions

L

lwm

I did this with the macro recorder and it does not work.

ActiveCell.FormulaR1C1 = "Jan"
Selection.AutoFill Destination:=ActiveCell.Range("A1:L1"), Type:= _
xlFillDefault
ActiveCell.Range("A1:L1").Select

I am looking for an easy way top pread the months across the top of the
page. This is for a calss on macros and how to modify.

Thanks in advance.
 
G

GTVT06

I did this with the macro recorder and it does not work.

        ActiveCell.FormulaR1C1 = "Jan"
    Selection.AutoFill Destination:=ActiveCell.Range("A1:L1"), Type:= _
        xlFillDefault
    ActiveCell.Range("A1:L1").Select

I am looking for an easy way top pread the months across the top of the
page.  This is for a calss on macros and how to modify.

Thanks in advance.

Hello Try this:

Range("A1").FormulaR1C1 = "Jan"
Range("B1").FormulaR1C1 = "Feb"
Range("A1:B1").Select
Selection.AutoFill Destination:=Range("A1:L1"),
Type:=xlFillDefault
Range("A1:L1").Select
 
L

lwm

Thanks That will work also.

GTVT06 said:
Hello Try this:

Range("A1").FormulaR1C1 = "Jan"
Range("B1").FormulaR1C1 = "Feb"
Range("A1:B1").Select
Selection.AutoFill Destination:=Range("A1:L1"),
Type:=xlFillDefault
Range("A1:L1").Select
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top