PC Review


Reply
Thread Tools Rate Thread

Autofill using variables

 
 
Deecrypt
Guest
Posts: n/a
 
      4th Jan 2007
Hi,
Please tell me what is wrong with the below statements. I'm positive
that it is a trivial error but I cant seem to figure this out. This
code works fine if I use absolute cells references i.e "D17" rather
than pasteMonthStart, & pasteMonthEnd.

ActiveCell.Offset(0, 3).Select
ActiveCell.FormulaR1C1 = "=TEXT(RC[-3],""mmmmmmmmm_yyyy"")"
Range(pasteStart).Select
Selection.AutoFill Destination:=Range("pasteMonthStart, &
pasteMonthEnd")


Thank you kindly
Deecrypt

 
Reply With Quote
 
 
 
 
Mike Fogleman
Guest
Posts: n/a
 
      4th Jan 2007
Try:

Selection.AutoFill Destination:=Range(pasteMonthStart, pasteMonthEnd)

Mike F

"Deecrypt" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
> Please tell me what is wrong with the below statements. I'm positive
> that it is a trivial error but I cant seem to figure this out. This
> code works fine if I use absolute cells references i.e "D17" rather
> than pasteMonthStart, & pasteMonthEnd.
>
> ActiveCell.Offset(0, 3).Select
> ActiveCell.FormulaR1C1 = "=TEXT(RC[-3],""mmmmmmmmm_yyyy"")"
> Range(pasteStart).Select
> Selection.AutoFill Destination:=Range("pasteMonthStart, &
> pasteMonthEnd")
>
>
> Thank you kindly
> Deecrypt
>



 
Reply With Quote
 
Deecrypt
Guest
Posts: n/a
 
      4th Jan 2007
Thanx for your prompt reply Mike,
I tried your solution but was unsuccessful. Eventually found the below
solution so am displaying that for the benefit of all.

Range(pasteMonthStart).Select
Selection.AutoFill Destination:=Range(pasteMonthStart & ":" &
pasteMonthEnd)

Thank you
Deecrypt

Mike Fogleman wrote:

> Try:
>
> Selection.AutoFill Destination:=Range(pasteMonthStart, pasteMonthEnd)
>
> Mike F
>
> "Deecrypt" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi,
> > Please tell me what is wrong with the below statements. I'm positive
> > that it is a trivial error but I cant seem to figure this out. This
> > code works fine if I use absolute cells references i.e "D17" rather
> > than pasteMonthStart, & pasteMonthEnd.
> >
> > ActiveCell.Offset(0, 3).Select
> > ActiveCell.FormulaR1C1 = "=TEXT(RC[-3],""mmmmmmmmm_yyyy"")"
> > Range(pasteStart).Select
> > Selection.AutoFill Destination:=Range("pasteMonthStart, &
> > pasteMonthEnd")
> >
> >
> > Thank you kindly
> > Deecrypt
> >


 
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
What has priority: PATH from User variables or system variables? Sabine Elsner Windows XP Help 3 21st Oct 2008 02:42 PM
Outlook AutoFill Delete one autofill entry only katr52@yahoo.com Microsoft Outlook Discussion 4 5th Oct 2006 10:37 PM
autofill with variables trouble akh2103@gmail.com Microsoft Excel Programming 1 21st Jul 2006 10:46 PM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Microsoft Excel Misc 1 17th Jun 2005 08:21 PM
Q. Autofill question: Can I autofill alpha characters like I can numbers? George Microsoft Excel Programming 5 7th Aug 2004 10:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:14 AM.