Error Message - Object invoked has disconnected from its clients

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
 
G

Guest

Hi Both of You,
I got the same error and was browsing to see if I could get some help.
Kris, you seem to be stuck like me. let me describe my position and see how
it tallies with yours.

I am writing an application that creates a number of workbooks under
programme control and links them together. A sub first creates the workbooks
and another populates them from a master list.

Now I get this error only on computers with less memory. With 512 Mb
RAM, the thing just blazes through, but with even 384 MB, it gets stuck at
precisely the same point. And yes, I get the same error message

Run-time error’-2147417848 (80010108)’:

Automation error
The object invoked has disconnected from its clients

The code I am running at the point of occurance is

SUWb.Sheets(SUName).Activate
Range(Cells(FIRSTROW, SERCOL), Cells(FIRSTROW + nos - 1,
SERCOL)).Select
Selection.EntireRow.Insert
MasterWb.Sheets(Catg).Activate
ActiveSheet.Range(Cells(StartRow, SERCOL), _
Cells(StartRow + nos - 1, FLYSCOL)).Copy
SUWb.Sheets(SUName).Activate
ActiveSheet.Paste Destination:=Cells(FIRSTROW, SERCOL)

The error occurs on the last line and the application hangs. Other
applications run normally.

SOme other facts that I picked up from the Task manager are :-
System check indicates that
1. Excel is using 85 – 94 % of processor time
2. 16,364 K memory (winword 19,028 K appears to be normal)
3. Peak CPU usage before break point is about 52% and page file usage is
89.2MB
4. At break point Page file usage is 89.5MB.


Can all this info provide some clue ??

Jai
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top