Results 1 to 8 of 8

Thread: Making ActiveX control for Excel 2003

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2010
    Posts
    6

    Making ActiveX control for Excel 2003

    Hello,
    I am making ActiveX control project in VB6. It creates .ocx file I can add this control in other projects but while adding it to excel 2003 as a activex control, it's content doesn't show. It's only appearing by borders. However many other activex control in my computer can be added to excel. Can't VB6 's activex controls be added to excel?
    thanks

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Making ActiveX control for Excel 2003

    Welcome to the forums.

    I am willing to bet that it something within your usercontrol that is the problem. We'd have no way of knowing without more detailed info.

    1. Suggest looking at code that may be using the Ambient.UserMode to turn on/off functions. Note that not all ocx containers will eport Ambient.UserMode the same way, if at all.

    2. Suggest looking at code where you may be using On Error Resume Next which may be hiding an error you should be aware of.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2010
    Posts
    6

    Re: Making ActiveX control for Excel 2003

    thanks for the answer LaVolpe...
    I created a ActiveX Control project.
    I have added just a button on the usercontrol...there is no code.
    I am making it .ocx from the file menu.
    Should I add a code in it?
    If there is a sample project that would be very useful...
    thank you very much...

  4. #4
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Making ActiveX control for Excel 2003

    So, your ocx is just a container for the VB button? And when you add to your Excel app, the button is not visible? You have no other code that is toggling the button's visibility? Maybe a small screenshot of what the button looks like when run in a VB project and what it looks like run in your Excel.

    One more question. Is this happening on the same pc that the ocx was created/compiled on?
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  5. #5

    Thread Starter
    New Member
    Join Date
    Nov 2010
    Posts
    6

    Re: Making ActiveX control for Excel 2003

    Compiling activex control project. It has a button which shows a messagebox:

    Name:  2.JPG
Views: 2525
Size:  75.8 KB


    In another exe project I am adding that ocx as a component:

    Name:  4.JPG
Views: 2300
Size:  64.1 KB


    Works fine:

    Name:  5.JPG
Views: 1742
Size:  10.4 KB


    However When I add in to excel as a ActiveX Control:

    Name:  6.JPG
Views: 2312
Size:  53.6 KB


    It looks like this:

    Name:  7.JPG
Views: 1838
Size:  45.3 KB


    and all of these on same computer...

  6. #6

    Thread Starter
    New Member
    Join Date
    Nov 2010
    Posts
    6

    Solved by Interop-Forms-Toolkit

    I have solved the problem with this page: http://channel9.msdn.com/Blogs/funky...rms-Toolkit-20

  7. #7

    Thread Starter
    New Member
    Join Date
    Nov 2010
    Posts
    6

    Re: Making ActiveX control for Excel 2003

    Quote Originally Posted by mech3 View Post
    Compiling activex control project. It has a button which shows a messagebox:

    Name:  2.JPG
Views: 2525
Size:  75.8 KB


    In another exe project I am adding that ocx as a component:

    Name:  4.JPG
Views: 2300
Size:  64.1 KB


    Works fine:

    Name:  5.JPG
Views: 1742
Size:  10.4 KB


    However When I add in to excel as a ActiveX Control:

    Name:  6.JPG
Views: 2312
Size:  53.6 KB


    It looks like this:

    Name:  7.JPG
Views: 1838
Size:  45.3 KB


    and all of these on same computer...
    I still need an help about the making excel control in VB6.

    thanks...

  8. #8

    Thread Starter
    New Member
    Join Date
    Nov 2010
    Posts
    6

    Re: Making ActiveX control for Excel 2003

    it is solved when I switch off the design mode in Excel...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width