Thread: Formula
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Brad Vontur[_2_] Brad Vontur[_2_] is offline
external usenet poster
 
Posts: 16
Default Formula

You have the syntax a little wrong. Your code

With Worksheets("Email"
Range("B2").Formula = "FORMULA
Range("C2").Formula = "FORMULA
Range("D2").Formula = "FORMULA
Range("B2:D2").AutoFill Destination:=Range("B2:D125"
End Wit

Should be

With Worksheets("Email"
..Range("B2").Formula = "FORMULA
..Range("C2").Formula = "FORMULA
..Range("D2").Formula = "FORMULA
..Range("B2:D2").AutoFill Destination:=Range("B2:D125"
End Wit

You need the period to indicate it belongs to the Worksheets("Email"). Without the period indicating the range is qualified by the With statement, it's trying to use the Activesheet

-Brad