View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike Fogleman Mike Fogleman is offline
external usenet poster
 
Posts: 1,092
Default Autofill using variables

Try:

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

Mike F

"Deecrypt" wrote in message
ups.com...
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 "D1:D7" 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