Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 150059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:13:48+00:00 2026-05-11T09:13:48+00:00

I have created an ActiveX control using C++. I use Visual Basic code to

  • 0

I have created an ActiveX control using C++. I use Visual Basic code to instance the control in an Excel worksheet. I can only run the VB script once, subsequent runs cause the following runtime error when attempting to access the ‘ActiveSheet’ variable:

Microsoft Visual Basic  Run-time error '-2147319765 (8002802b)':  Automation error Element not found 

I am trying to work out what causes this error and how I can fix it?

As an experiment I tried creating a simple ActiveX control generated by Visual Studio wizards (in both VS 2005 & 2008). I didn’t add or modify any code in this test case. The simple test case still causes this error.

Other ActiveX controls in the system don’t cause this error (eg I tried instancing ‘Bitmap Image’) from VB code.

This is the VB code (a macro that I recorded, but hand-coded VB has the same issue):

Sub Macro1()     ActiveSheet.OLEObjects.Add(ClassType:='test.test_control.1' _         , Link:=False, DisplayAsIcon:=False).Select End Sub 

Can anyone give me an answer on this? Alternatively any pointers to resources that may help will be appreciated.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T09:13:49+00:00Added an answer on May 11, 2026 at 9:13 am

    After talking to Microsoft I found out the cause of the problem I was having.

    When creating an ActiveX control using the VS 2005/2008 wizard you need to check the ‘Connection points’ check box in the ‘Options’ page. This adds, among other things, IConnectionPointContainerImpl as a base class for your ATL class, which in turn implements IConnectionPointContainer.

    Failure to do this means that you can’t insert your ActiveX control into an Excel document via Visual Basic more than once. The second time you execute the script you start getting the ‘automation errors’.

    The answer to the problem was simple enough and it worked, although I am still not sure how it actually relates to the ‘automation error’ and leaves me wondering why the error messages are not more informative.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 166k
  • Answers 166k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can copy them to the web applications /bin folder.… May 12, 2026 at 1:18 pm
  • Editorial Team
    Editorial Team added an answer So, the following seems to work for me: #include <vector>… May 12, 2026 at 1:18 pm
  • Editorial Team
    Editorial Team added an answer Presuming you are using at least jQuery 1.3 (i.e. with… May 12, 2026 at 1:18 pm

Related Questions

I currently have an ActiveX control which links in many c/c++ dlls. The problem
We are using a system that allows ActiveX extensions through .ocx files. I need
Since there is apparently no Flash control that can accept bitmap pastes , I
I'm using the Crystal Reports Viewer 11 ActiveX control in an Access form (version

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.