+ Reply to Thread
Results 1 to 3 of 3

VBA: Creating and attaching new sub to a newly created activex control?

  1. #1
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Portsmouth, VA now, Falmouth, VA 4 yrs, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    617

    VBA: Creating and attaching new sub to a newly created activex control?

    After programmatically creating a new activex checkbox, I want to create a sub for it's click event. I have given the object a name, and fortunately the code for it's click event is a one-line call of another sub, but how???

    The sub would look like the following except be named after the new control (obviously), and yes, it is just the number in the name that changes:

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: VBA: Creating and attaching new sub to a newly created activex control?

    You need to create a class to listen for the events that your new control raises. Have a look here http://stackoverflow.com/questions/1...mically-in-vba

  3. #3
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Portsmouth, VA now, Falmouth, VA 4 yrs, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    617

    Re: VBA: Creating and attaching new sub to a newly created activex control?

    Your monkey is driving me nuts.

    You got to appreciate that!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Assigning Macros to Macro created ActiveX Control Box
    By sm9748 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-18-2013, 02:02 PM
  2. Attaching a file to an e-mail created from a VBA macro
    By hcarpenter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-17-2013, 06:51 PM
  3. Attaching ActiveX control to a graph/plot....
    By spacely in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 12-22-2012, 09:23 AM
  4. Creating a file in a newly created folder.
    By AnthonyWB in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-12-2010, 03:01 PM
  5. Paste into newly created tab
    By robertc12 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-21-2009, 03:27 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1