+ Reply to Thread
Results 1 to 4 of 4

My macro only works manually

  1. #1
    Registered User
    Join Date
    08-21-2013
    Location
    mexico
    MS-Off Ver
    Excel 2010
    Posts
    5

    Post My macro only works manually

    Hi,

    I have a created a different macro in three separate sheets. The macro in my first sheet works correctly. I choose an option from my combo box and the macro runs automatically when I change it. In the other two sheets, although the code is constructed the same way, I need to click: Macro, Select the Macro, and Run. for it to work.

    What do I have to correct for it to be automatic like the first?
    It's all in Module1 General

    Please Login or Register  to view this content.



    Then in each Sheet I have:


    Please Login or Register  to view this content.

    Hope you can help. Thanks!

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: My macro only works manually

    That sheet code does nothing.

    The trigger depends on whether you are using Forms or ActiveX controls in the sheet.

    If the code does the same, name the routine something like this:
    Please Login or Register  to view this content.
    In your worksheet code, for an ActiveX combobox1 control:
    Please Login or Register  to view this content.
    Assign a Forms control the mSub macro.

    You might want to add some other small routine to pass the controls value for the main Sub to act on.
    Last edited by Kenneth Hobson; 08-30-2013 at 05:04 PM.

  3. #3
    Registered User
    Join Date
    08-21-2013
    Location
    mexico
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: My macro only works manually

    The code is not exactly the same in the three sheets. It hides different rows. So what do I have to do to make it automatic?

  4. #4
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: My macro only works manually

    Then just put the code in the Sheet's code if an ActiveX control. If it is a Forms control then put it in a Module.

+ 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. Replies: 1
    Last Post: 07-15-2011, 01:24 AM
  2. Replies: 2
    Last Post: 05-04-2010, 06:19 AM
  3. Advanced Filter works manually but not in VBA?
    By rob0r in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-29-2009, 08:16 AM
  4. [SOLVED] VLOOKUP only works on data manually entered.
    By Mike Rogers in forum Excel General
    Replies: 6
    Last Post: 04-25-2006, 02:20 PM
  5. pivot table - works manually not by macro
    By jnewl in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-19-2006, 08:50 AM

Tags for this Thread

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