Consulting

Results 1 to 5 of 5

Thread: Hide the Macro form Dialog Box

  1. #1
    VBAX Newbie
    Joined
    May 2023
    Posts
    1
    Location

    Hide the Macro form Dialog Box

    Good Evening

    I am new in VBA in excell , I was practicing & there are many macro .My question is if there is any way to hide a macro from appearing as an option in the dialog box .


    Thanks

  2. #2
    VBAX Expert Logit's Avatar
    Joined
    Sep 2016
    Posts
    613
    Location
    When naming the SUB put PRIVATE in front of the term SUB ....

    Private Sub ThisIsMySubName ()
    ... your code.....
    End Sub

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,726
    Location
    Also, if you know the macro name, you can still manually enter the name and then run it

    Also #2, if the Sub requires parameters it won't show in the list
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  4. #4
    VBAX Expert Dave's Avatar
    Joined
    Mar 2005
    Posts
    835
    Location
    You can also change your Sub to a Function which will make you crazy when you're looking on you're macro list for a procedure that obviously exists (personal experience). Dave

  5. #5
    VBAX Master Aflatoon's Avatar
    Joined
    Sep 2009
    Location
    UK
    Posts
    1,720
    Location
    Or use Option Private Module
    Be as you wish to seem

Posting Permissions

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