View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
EAHRENS
 
Posts: n/a
Default Need help modifying a macro

I am sure I am doing something wrong. The macro I am running now reads:
Sub ICS214()
'
' ICS214 Macro
' Macro recorded 10/5/2005 by Eric Ahrens
'
'Copy the active worksheet to just before the currently active sheet [copy
sheet]
ActiveSheet.Copy Befo=ActiveSheet
'Copy the active worksheet to after the last worksheet
ActiveSheet.Copy After:=Sheets(Sheets.Count) 'Rename current Sheet
ActiveSheet.Name = "Renamed14a" 'delete constants, retaining formulas in
the range d29-d46
Range(D29:d46).SpecialCells(xlConstants).ClearCont ents


'
End Sub

When I run it, I get a syntax error message highlighting:

Range(D29:d46).SpecialCells(xlConstants).ClearCont ents

What am I doing wrong?

"David McRitchie" wrote:

retaining formulas in the range d29-d46
Range(D29:D46).SpecialCells(xlConstants).ClearCont ents