Error msg - the object invoked has disconnected from its clients

M

MarMo

Hi all,

This is the message i get after a code has been activated twice.
*********************************************
Error code - 2147417848 (80010108)
Automation error
The object invoked disconnected from its clients
*********************************************

In the application i created 5 userforms.

FrmClients
FrmInput
FrmOptions
FrmAbout
FrmMainMenu


For FrmClients and FrmInput , I have code to sort the clientslist.
FrmClients will be sorted with Names Ascending
code :
Sub SortOutCustomers()
Sheets("Clients").Select
Range("A1").Select
Selection.CurrentRegion.Select
Selection.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A1").Select
End Sub

For FrmInput the clients are sorted with Clientcode Ascending
code :
Sub SortOutCustomersNbrs()
Worksheets("Clients").Range("A1").Sort _
Key1:=Worksheets("Clients").Columns("A"), _
Header:=xlYes
Range("A1").Select
End Sub

When i switch between those 2 forms , the message above will appear after
the 2nd switch.
What can i do to repair this error.

Thanks to help .
MarMo
 

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