G
Guest
I have a spreadsheet that worked fine yesterday, but today, it just doesnt
want to play ball.
When running one of the procedures, I get the following error, which pops up
and then Excel terminates, asking whether or not to send an error repor
------------------------------------------------------------------------------------------
Run-Time error '-2147417848 (80010108)':
Automation Error
The object invoked has disconnected from its clients
------------------------------------------------------------------------------------------
along with the 4 usual buttons -
On the Click of Button on a User Form, the code is supposed to establish the
next free row to create a new record in. However, when there are previous
records in the spreadsheet the error above is generated when it tries to
execute the line marked with an *
Dim TOURCheckNew As String
Dim TOURNewRow as Long
Private Sub TOUR_NewRecord_Btn_Click()
Dim ctlInfo As Control
'Establishes Next Blank Row
TOURCheckNew = "New"
If Not dbs_SafetyInput.Range("A2").Value = "" Then 'Check If _
Record Previously Exists
* TOURNewRow = dbs_SafetyInput.Range("A" & _
dbs_SafetyInput.Rows.Count).End(xlUp).Offset(1, 0).Row
Else
TOURNewRow = 1
End If
I have also tried to see if removing all the records makes any difference,
which it should, as it shouldnt run that line, and instead of running fine
and just setting TOURNewRow = 1, the userform wont even load, and I get
Run-Time Error '13'
Type Mis-Match
Any help would be greatly appreciated, especially as I am doubly confused,
as I have another userform in the same workbook still running absolutely as
it should, which has almost identical code behind it
Thanks
Kris
want to play ball.
When running one of the procedures, I get the following error, which pops up
and then Excel terminates, asking whether or not to send an error repor
------------------------------------------------------------------------------------------
Run-Time error '-2147417848 (80010108)':
Automation Error
The object invoked has disconnected from its clients
------------------------------------------------------------------------------------------
along with the 4 usual buttons -
On the Click of Button on a User Form, the code is supposed to establish the
next free row to create a new record in. However, when there are previous
records in the spreadsheet the error above is generated when it tries to
execute the line marked with an *
Dim TOURCheckNew As String
Dim TOURNewRow as Long
Private Sub TOUR_NewRecord_Btn_Click()
Dim ctlInfo As Control
'Establishes Next Blank Row
TOURCheckNew = "New"
If Not dbs_SafetyInput.Range("A2").Value = "" Then 'Check If _
Record Previously Exists
* TOURNewRow = dbs_SafetyInput.Range("A" & _
dbs_SafetyInput.Rows.Count).End(xlUp).Offset(1, 0).Row
Else
TOURNewRow = 1
End If
I have also tried to see if removing all the records makes any difference,
which it should, as it shouldnt run that line, and instead of running fine
and just setting TOURNewRow = 1, the userform wont even load, and I get
Run-Time Error '13'
Type Mis-Match
Any help would be greatly appreciated, especially as I am doubly confused,
as I have another userform in the same workbook still running absolutely as
it should, which has almost identical code behind it
Thanks
Kris