+ Reply to Thread
Results 1 to 5 of 5

Excel VBA: Automatically activating Private Subs

  1. #1
    Registered User
    Join Date
    06-11-2006
    Posts
    7

    Excel VBA: Automatically activating Private Subs

    Hello,

    I have 21 combo boxes in one worksheet each having its own private sub (Private Sub abc_activate()) for a selection procedure.
    If I select each sub in the VBA Editor and then click on the run sub/userform button the correct result is shown in the respective combo box.
    But it does not do it automatically when I click on the workbook or open up the file.

    How do I automate this clicking orgy?

    Rgds,
    Sven

  2. #2
    Tom Ogilvy
    Guest

    RE: Excel VBA: Automatically activating Private Subs

    Use the click event of the combobox.

    --
    Regards,
    Tom Ogilvy


    "sven_dau" wrote:

    >
    > Hello,
    >
    > I have 21 combo boxes in one worksheet each having its own private sub
    > (Private Sub abc_activate()) for a selection procedure.
    > If I select each sub in the VBA Editor and then click on the run
    > sub/userform button the correct result is shown in the respective combo
    > box.
    > But it does not do it automatically when I click on the workbook or
    > open up the file.
    >
    > How do I automate this clicking orgy?
    >
    > Rgds,
    > Sven
    >
    >
    > --
    > sven_dau
    > ------------------------------------------------------------------------
    > sven_dau's Profile: http://www.excelforum.com/member.php...o&userid=35291
    > View this thread: http://www.excelforum.com/showthread...hreadid=562771
    >
    >


  3. #3
    Tom Ogilvy
    Guest

    RE: Excel VBA: Automatically activating Private Subs

    Use the click event of the combobox.

    --
    Regards,
    Tom Ogilvy


    "sven_dau" wrote:

    >
    > Hello,
    >
    > I have 21 combo boxes in one worksheet each having its own private sub
    > (Private Sub abc_activate()) for a selection procedure.
    > If I select each sub in the VBA Editor and then click on the run
    > sub/userform button the correct result is shown in the respective combo
    > box.
    > But it does not do it automatically when I click on the workbook or
    > open up the file.
    >
    > How do I automate this clicking orgy?
    >
    > Rgds,
    > Sven
    >
    >
    > --
    > sven_dau
    > ------------------------------------------------------------------------
    > sven_dau's Profile: http://www.excelforum.com/member.php...o&userid=35291
    > View this thread: http://www.excelforum.com/showthread...hreadid=562771
    >
    >


  4. #4
    Tom Ogilvy
    Guest

    RE: Excel VBA: Automatically activating Private Subs

    Use the click event of the combobox.

    --
    Regards,
    Tom Ogilvy


    "sven_dau" wrote:

    >
    > Hello,
    >
    > I have 21 combo boxes in one worksheet each having its own private sub
    > (Private Sub abc_activate()) for a selection procedure.
    > If I select each sub in the VBA Editor and then click on the run
    > sub/userform button the correct result is shown in the respective combo
    > box.
    > But it does not do it automatically when I click on the workbook or
    > open up the file.
    >
    > How do I automate this clicking orgy?
    >
    > Rgds,
    > Sven
    >
    >
    > --
    > sven_dau
    > ------------------------------------------------------------------------
    > sven_dau's Profile: http://www.excelforum.com/member.php...o&userid=35291
    > View this thread: http://www.excelforum.com/showthread...hreadid=562771
    >
    >


  5. #5
    Registered User
    Join Date
    06-11-2006
    Posts
    7
    Tom,

    If you mean changing from _activate to _click, i.e. from Private Sub abc_activate() to Private Sub abc_click() in the VBA Editor then it does not work. The combo box remains empty.

    Also, combo box properties does not have an event item.

    ?

    Thanks,
    Sven

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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