PC Review


Reply
Thread Tools Rate Thread

Atofill Questions

 
 
lwm
Guest
Posts: n/a
 
      18th Jan 2008
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.
 
Reply With Quote
 
 
 
 
GTVT06
Guest
Posts: n/a
 
      18th Jan 2008
On Jan 18, 2:35*pm, lwm <l...@discussions.microsoft.com> wrote:
> 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
 
Reply With Quote
 
lwm
Guest
Posts: n/a
 
      18th Jan 2008
Found the problem I was running from the editor instead of wroksheet

"lwm" wrote:

> 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.

 
Reply With Quote
 
lwm
Guest
Posts: n/a
 
      18th Jan 2008
Thanks That will work also.

"GTVT06" wrote:

> On Jan 18, 2:35 pm, lwm <l...@discussions.microsoft.com> wrote:
> > 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
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bookmark questions Access/Word Error Message Two Questions Kenny G Microsoft Access Form Coding 0 1st Aug 2008 04:11 PM
Linksys NAS200 questions (general questions about RAID 0, 1) Aloke Prasad Storage Devices 0 6th Aug 2007 01:04 AM
Form that asks questions based on responses to other Questions =?Utf-8?B?YWtrcnVn?= Microsoft Access Getting Started 3 6th Jul 2007 02:43 PM
Re: After the Deletion of Google Answers, U Got Questions Fills the Gap Answering and Asking the Tough Questions sechumlib Microsoft C# .NET 0 7th May 2007 07:35 PM
SATA drive questions + raid questions O |V| 3 G A DIY PC 17 29th Sep 2003 11:28 PM


Features
 

Advertising
 

Newsgroups
 


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