Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Lord, there's power in posting..! I figured this one out. Needed to
"unprotect" the worksheet first.. duh! "tish" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Method 'MacroOptions' of object'_Application' failed Runtime Error 1004 | Excel Discussion (Misc queries) | |||
Run-Time error '1004' : Select method of Range class failed | Excel Discussion (Misc queries) | |||
Run-time error "1004" Select method of range class failed | Excel Discussion (Misc queries) | |||
runtime error 1004 method range of object '_global failed | Excel Discussion (Misc queries) | |||
Help: runtime error - Method seriescollection object_chart failed | Charts and Charting in Excel |