rclark
05-30-2013, 07:21 AM
Hi forum. i have a very basic macro that has run fine for quite some time on my computer. I moved this to another user and it crashes about 20% of the time.
This is the error:
Run-time error'-2147417848 (80010108)':
Automation error
The object invoked has disconnected from its clients.
This is the code:
Sub Stamp()
'Stamp Macro
'Keyboard Shortcut: Ctrl+q
Application.ScreenUpdating = False
Sheets("Tracker").Select
ActiveSheet.Unprotect
Rows("4:4").Select
Selection.Copy
Selection.Insert Shift:=xlDown
Range("A4:f4").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("g5").Select
ActiveCell.FormulaR1C1 = "=NOW()"
Range("g5").Select
Selection.Copy
Range("f4,g5").Select
Range("g5").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("h6:j6").Select
Application.CutCopyMode = False
Selection.Copy
Range("h5:j5").Select
ActiveSheet.Paste
Rows("5:5").Select
Application.CutCopyMode = False
Selection.Locked = True
Selection.FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("C4").Select
ActiveCell.FormulaR1C1 = "No"
Range("A4").Select
Range("A4").Select
Application.ScreenUpdating = True
End Sub
when I go to debug, the red text line is highlighted.
Can someone help me recode this so I don't get the error? BTW this continues to work fine on 2 other computers and we have reinstalled Office on the one having the trouble and IT assures me it is my code.
Thanks in advance!
This is the error:
Run-time error'-2147417848 (80010108)':
Automation error
The object invoked has disconnected from its clients.
This is the code:
Sub Stamp()
'Stamp Macro
'Keyboard Shortcut: Ctrl+q
Application.ScreenUpdating = False
Sheets("Tracker").Select
ActiveSheet.Unprotect
Rows("4:4").Select
Selection.Copy
Selection.Insert Shift:=xlDown
Range("A4:f4").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("g5").Select
ActiveCell.FormulaR1C1 = "=NOW()"
Range("g5").Select
Selection.Copy
Range("f4,g5").Select
Range("g5").Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("h6:j6").Select
Application.CutCopyMode = False
Selection.Copy
Range("h5:j5").Select
ActiveSheet.Paste
Rows("5:5").Select
Application.CutCopyMode = False
Selection.Locked = True
Selection.FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Range("C4").Select
ActiveCell.FormulaR1C1 = "No"
Range("A4").Select
Range("A4").Select
Application.ScreenUpdating = True
End Sub
when I go to debug, the red text line is highlighted.
Can someone help me recode this so I don't get the error? BTW this continues to work fine on 2 other computers and we have reinstalled Office on the one having the trouble and IT assures me it is my code.
Thanks in advance!