I Started to get this error lately when running a macro. I seem to get it when I run multiple instances of excel to run at the same time (10 at the same time).
MESSAGE BOX
Automation error
The object invoked has disconnected from it's clients.
This is where the Error occurs Section
(shtStartNums.Rows("7:7").<wbr style="display: inline-block;">Select
Selection.PasteSpecial Paste:=<wbr style="display: inline-block;">xlPasteAllUsingSourceTheme,
'This function takes data in row 5 of the Start Numbers New sheet and pastes it into the main table.
'It effectively archives the data
Sub CopyStartNumbersDown(Optional IsSupercycle As Boolean = False)
Dim r As Range
CalcOff
Dim oldsh As Worksheet
Set oldsh = ActiveSheet
Set r = Selection
'make sure the sheet is selected
shtStartNums.Activate
'Check to see if we already archived for the day. if so, then give the choice to replace or cancel. Can only have one day
If (IsSupercycle = False And shtStartNums.Range("<wbr style="display: inline-block;">LiveDataStart").Value = shtStartNums.Range("<wbr style="display: inline-block;">LiveDataStart").Cells(3, 1).Value) Or (IsSupercycle = True And shtStartNums.Range("<wbr style="display: inline-block;">SuperCycleDateStart").Value = shtStartNums.Range("<wbr style="display: inline-block;">LiveDataStart").Cells(3, 1).Value) Then
' If MsgBox("Date already exists. Replace?", vbOKCancel) = vbCancel Then
' GoTo Cleanup
'
' End If
Else
'Insert if it doesn't exists
shtStartNums.Rows("7:7").<wbr style="display: inline-block;">Insert Shift:=xlDown, CopyOrigin:=<wbr style="display: inline-block;">xlFormatFromLeftOrAbove
End If
If IsSupercycle = False Then
shtStartNums.Rows("5:5").<wbr style="display: inline-block;">Select
Else
shtStartNums.Rows("3:3").<wbr style="display: inline-block;">Select
End If
Selection.Copy
shtStartNums.Rows("7:7").<wbr style="display: inline-block;">Select
Selection.PasteSpecial Paste:=<wbr style="display: inline-block;">xlPasteAllUsingSourceTheme, Operation:=xlNone _
, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
cleanup:
If Not r Is Nothing Then
oldsh.Activate
r.Select
End If
End Sub
MESSAGE BOX
Run-time error "2147417848 (80010108)':
<strike></strike>Automation error
The object invoked has disconnected from it's clients.
This is where the Error occurs Section
(shtStartNums.Rows("7:7").<wbr style="display: inline-block;">Select
Selection.PasteSpecial Paste:=<wbr style="display: inline-block;">xlPasteAllUsingSourceTheme,
Operation:=xlNone _
, SkipBlanks:=False, Transpose:=False
, SkipBlanks:=False, Transpose:=False
MACRO
'It effectively archives the data
Sub CopyStartNumbersDown(Optional IsSupercycle As Boolean = False)
Dim r As Range
CalcOff
Dim oldsh As Worksheet
Set oldsh = ActiveSheet
Set r = Selection
'make sure the sheet is selected
shtStartNums.Activate
'Check to see if we already archived for the day. if so, then give the choice to replace or cancel. Can only have one day
If (IsSupercycle = False And shtStartNums.Range("<wbr style="display: inline-block;">LiveDataStart").Value = shtStartNums.Range("<wbr style="display: inline-block;">LiveDataStart").Cells(3, 1).Value) Or (IsSupercycle = True And shtStartNums.Range("<wbr style="display: inline-block;">SuperCycleDateStart").Value = shtStartNums.Range("<wbr style="display: inline-block;">LiveDataStart").Cells(3, 1).Value) Then
' If MsgBox("Date already exists. Replace?", vbOKCancel) = vbCancel Then
' GoTo Cleanup
'
' End If
Else
'Insert if it doesn't exists
shtStartNums.Rows("7:7").<wbr style="display: inline-block;">Insert Shift:=xlDown, CopyOrigin:=<wbr style="display: inline-block;">xlFormatFromLeftOrAbove
End If
If IsSupercycle = False Then
shtStartNums.Rows("5:5").<wbr style="display: inline-block;">Select
Else
shtStartNums.Rows("3:3").<wbr style="display: inline-block;">Select
End If
Selection.Copy
shtStartNums.Rows("7:7").<wbr style="display: inline-block;">Select
Selection.PasteSpecial Paste:=<wbr style="display: inline-block;">xlPasteAllUsingSourceTheme, Operation:=xlNone _
, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
cleanup:
If Not r Is Nothing Then
oldsh.Activate
r.Select
End If
End Sub