Automation error

Giordano Bruno

Well-known Member
Joined
Jan 7, 2007
Messages
1,322
I click a button im my workbook and a multipage UserForm appears. I click one of the Options and a Tree View form appears. I work through the branches and select an item from the tree. This dumps the relevant code for that item in my workbook. I then use this code to pull data from an closed workbook and dump it into my workbook.

Now comes the tricky part. I try to apply data validation to a cell in my workbook based on the data downloaded. At the line starting .Add Type:= in the following code section:

<font face=Courier New>    <SPAN style="color:#00007F">With</SPAN> Selection.Validation
        .Delete
        .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
        xlBetween, Formula1:="=R" & aR & "C24:R" & aR & "C" & Lim
    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN>
    </FONT>

The code is halted with the message:  Run-time error '2147417848(800 10 108)': Automation error  The object invoked has disconnected from its clients.

If anyone has any experience with this error message, I would be most grateful for their help
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,128
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Mobile
  3. Web
Sounds more like an activeX issue than an Excel issue can you confirm if this is the a likely case. If so which OS and Excel version are you using

KR

Dave
 
Upvote 0

Giordano Bruno

Well-known Member
Joined
Jan 7, 2007
Messages
1,322
Hi dave3009,

Using windows XP Professional version 2002 and xl2003. I thought that it might be related to an activeX. I am using ADO to copy data from the closed workbook. Can anything be done about it?
 
Upvote 0

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,128
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Mobile
  3. Web
I'm afraid my knowledge of VBA and ActiveX draws a blank. I only knew the error as it was not a normal thing.

If you wish I can remove my posts and return the post to an unsolved state.

Your call

Dave
 
Upvote 0

Giordano Bruno

Well-known Member
Joined
Jan 7, 2007
Messages
1,322
Hi dave3009,

My knowledge of removing posts draws a blank. Does it do any good. I would imagine that anyone who sees the title and knows anything useful would read it anyway.

Your call

Thanks
 
Upvote 0

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,128
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Mobile
  3. Web
Hi Giordano

Might help leaving it in place

Hope you get a solution
 
Upvote 0

Forum statistics

Threads
1,190,834
Messages
5,983,159
Members
439,824
Latest member
jr599

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top