G
Guest
I'm getting this error when I try to run the macro. This is a worksheet &
macro that I inherited from the previous person. I'm usin Excel 2003. I tried
the macro on another person's computer, same error. I cut and pasted the code
into a blank worksheet and it worked fine!! Anyway, below is the code... Can
anyone offer any guidance on how to fix??
Sub Add_Current_Month()
'
' Add_Current_Month Macro
' Macro recorded 9/6/2001 by Department Of Treasury
'
' Keyboard Shortcut: Ctrl+a
'
Rows("12:12").Select
Selection.Insert Shift:=xlDown
Range("F12").Select
ActiveCell.FormulaR1C1 = "=1"
Range("F13").Select
ActiveCell.FormulaR1C1 = "=1+R[-1]C"
Range("D12").Select
ActiveCell.FormulaR1C1 = "=RC[-1]"
Range("D13").Select
ActiveCell.FormulaR1C1 = "=R[-1]C+RC[-1]"
Range("E12").Select
ActiveCell.FormulaR1C1 = "=RC[-1]/RC[1]"
Range("A12:C12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("A13:F13").Select
Selection.Copy
Range("A12:F12").Select
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Range("A12").Select
End Sub
macro that I inherited from the previous person. I'm usin Excel 2003. I tried
the macro on another person's computer, same error. I cut and pasted the code
into a blank worksheet and it worked fine!! Anyway, below is the code... Can
anyone offer any guidance on how to fix??
Sub Add_Current_Month()
'
' Add_Current_Month Macro
' Macro recorded 9/6/2001 by Department Of Treasury
'
' Keyboard Shortcut: Ctrl+a
'
Rows("12:12").Select
Selection.Insert Shift:=xlDown
Range("F12").Select
ActiveCell.FormulaR1C1 = "=1"
Range("F13").Select
ActiveCell.FormulaR1C1 = "=1+R[-1]C"
Range("D12").Select
ActiveCell.FormulaR1C1 = "=RC[-1]"
Range("D13").Select
ActiveCell.FormulaR1C1 = "=R[-1]C+RC[-1]"
Range("E12").Select
ActiveCell.FormulaR1C1 = "=RC[-1]/RC[1]"
Range("A12:C12").Select
Selection.Locked = False
Selection.FormulaHidden = False
Range("A13:F13").Select
Selection.Copy
Range("A12:F12").Select
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Range("A12").Select
End Sub