+ Reply to Thread
Results 1 to 4 of 4

Call Macros from Userforms

  1. #1
    Forum Contributor
    Join Date
    05-31-2013
    Location
    Philadelphia, Pa
    MS-Off Ver
    Excel 2010
    Posts
    170

    Call Macros from Userforms

    Hello All and Happy New Year!

    I've been using the below line to run a macro from a userform for the past 2 years without issue. Now it suddenly stopped working.

    Please Login or Register  to view this content.
    This line is written into the code for the Userform, and the macro "Full_List_Macros" is saved in a module in the same workbook. I know its not a problem with the macro, cause when I bypass the Userform and activate the macro everything works fine. So its just activating the macro from the command button that is the issue.

    Any thoughts?

    Dan

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Call Macros from Userforms

    Hi Dan,

    You may have changed the workbook name.

    If the Macro is in the same workbook the following should work:
    Please Login or Register  to view this content.
    Lewis

  3. #3
    Forum Contributor
    Join Date
    05-31-2013
    Location
    Philadelphia, Pa
    MS-Off Ver
    Excel 2010
    Posts
    170

    Re: Call Macros from Userforms

    Thanks. That didn't help, but I finally figured out the issue. I recently renamed the entire module to "Full_List_Macros". So now there was a module and a macro with the same name and the command didn't know what to do. I changed the name on the Module and everything works.

    Thanks though!

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Call Macros from Userforms

    Your welcome. You have to be very careful with names and duplicates can cause problems as you discovered. To avoid the problem I start all my module names with the letters 'Mod'.

+ 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. [SOLVED] Run Macros/Userforms in HTML format
    By pipoliveira in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-06-2012, 11:10 AM
  2. Web queries, Macros, Stop auto-running, Userforms
    By Flashart in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2008, 03:51 PM
  3. How to call on other macros
    By Mac3188 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-08-2007, 08:59 PM
  4. To Call 2 macros
    By napalm in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-14-2006, 03:09 AM
  5. [SOLVED] Userforms and Macros
    By cinvic in forum Excel General
    Replies: 2
    Last Post: 03-15-2006, 04:10 PM
  6. Is this possible? Macros, Userforms etc
    By xirokx in forum Excel General
    Replies: 1
    Last Post: 01-30-2006, 02:54 PM
  7. Storing macros, userforms
    By Jennifer in forum Excel General
    Replies: 0
    Last Post: 04-05-2005, 03:06 AM

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