ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Run-time error €˜-2147417848(8001 (https://www.excelbanter.com/excel-programming/420090-run-time-error-%E2%80%98-2147417848-8001-a.html)

Atef g

Run-time error €˜-2147417848(8001
 
hello all,
i've simple form to delete sheets and i have the following code:

Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Sheets(UserForm1.ComboBox1.Value).Delete
UserForm1.Hide
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub

when i click commandbutton1
the following error appear and excel is cranshing
Run-time error €˜-2147417848(80010108):
Automation error
The object invoked has disconnected from its clients.

i use excel2007 but i run this macro with file ( xls) not (xlsx) or (xlsm).
thanks in advance
atef

Per Jessen

Run-time error €˜-2147417848(
 
Hi

I tried your code in an empty workbook and your code works just fine in
XL2007.

Do you have any links or references in other sheets to the sheet which you
tries to delete?

Regards,
Per

"Atef g" <Atef skrev i meddelelsen
...
hello all,
i've simple form to delete sheets and i have the following code:

Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Sheets(UserForm1.ComboBox1.Value).Delete
UserForm1.Hide
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub

when i click commandbutton1
the following error appear and excel is cranshing
Run-time error €˜-2147417848(80010108):
Automation error
The object invoked has disconnected from its clients.

i use excel2007 but i run this macro with file ( xls) not (xlsx) or
(xlsm).
thanks in advance
atef



JLGWhiz

Run-time error €˜-2147417848(
 
That message is related to an SQL activity when Excel disconnects from the
web page or another application. Where does ComboBox1 get its values from?

"Atef g" wrote:

hello all,
i've simple form to delete sheets and i have the following code:

Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Sheets(UserForm1.ComboBox1.Value).Delete
UserForm1.Hide
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub

when i click commandbutton1
the following error appear and excel is cranshing
Run-time error €˜-2147417848(80010108):
Automation error
The object invoked has disconnected from its clients.

i use excel2007 but i run this macro with file ( xls) not (xlsx) or (xlsm).
thanks in advance
atef



All times are GMT +1. The time now is 04:46 PM.

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