ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run time error '-214741848 (80010108) (https://www.excelbanter.com/excel-programming/297357-run-time-error-214741848-80010108-a.html)

Static Bob

Run time error '-214741848 (80010108)
 
Hi Guys,

I have this code that has been working fine. It copies the active
sheet to a new workbook, then prompts the user to send it to accounts.
If they answer yes, it generates an e-mail. If not, it saves and close
the new book and returns to the original

This code is falling down on the line highlighted below, with a
run-time error I'm not familiar with . . .

Run time error '-214741848 (80010108)

Automation Error
The object invoked has disconnected from its clients

This has been working fine, and I have 15 instances of this workbook
in use. This is the only one to fall down with this error. It still
falls down in different environments. ie - not the users machine.

we are running Win2000prof & office 2k. The code is assigned to
on_click event of a control button.

Help please ! Cheers
Bob

plantlocation = Sheets("Maintenance Information").Range("C8").Value
Application.DisplayAlerts = False
Application.EnableEvents = False

ActiveSheet.Copy
*** debugs*** ActiveSheet.SaveAs Filename:=plantlocation &
Range("B3") & " - Plant Return" & ".xls"
email = MsgBox("Plant Return saved." & vbNewLine & vbNewLine & "Do you
want to e-mail this to Accounts now ?", vbYesNo, "Bluestone Site
Workbook")
If email = 6 Then
Application.Dialogs(xlDialogSendMail).Show
Else
End If

ActiveWindow.Close

Application.DisplayAlerts = True
Application.EnableEvents = True

Ron de Bruin

Run time error '-214741848 (80010108)
 
Hi Static Bob

Try to use the example on my site and see if you have the same problem
http://www.rondebruin.nl/sendmail.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Static Bob" wrote in message om...
Hi Guys,

I have this code that has been working fine. It copies the active
sheet to a new workbook, then prompts the user to send it to accounts.
If they answer yes, it generates an e-mail. If not, it saves and close
the new book and returns to the original

This code is falling down on the line highlighted below, with a
run-time error I'm not familiar with . . .

Run time error '-214741848 (80010108)

Automation Error
The object invoked has disconnected from its clients

This has been working fine, and I have 15 instances of this workbook
in use. This is the only one to fall down with this error. It still
falls down in different environments. ie - not the users machine.

we are running Win2000prof & office 2k. The code is assigned to
on_click event of a control button.

Help please ! Cheers
Bob

plantlocation = Sheets("Maintenance Information").Range("C8").Value
Application.DisplayAlerts = False
Application.EnableEvents = False

ActiveSheet.Copy
*** debugs*** ActiveSheet.SaveAs Filename:=plantlocation &
Range("B3") & " - Plant Return" & ".xls"
email = MsgBox("Plant Return saved." & vbNewLine & vbNewLine & "Do you
want to e-mail this to Accounts now ?", vbYesNo, "Bluestone Site
Workbook")
If email = 6 Then
Application.Dialogs(xlDialogSendMail).Show
Else
End If

ActiveWindow.Close

Application.DisplayAlerts = True
Application.EnableEvents = True





All times are GMT +1. The time now is 05:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com