Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Macro Not Shown with Alt+F8
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Sep 2014
    Posts
    120
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Macro Not Shown with Alt+F8

    I created a macro in my Personal.xlsb but it does not appear in the macro window when I hit Alt+F8. All my other macros show, only this one does not. The macro runs just fine from the VBA editor.

    Code:
    Sub DeleteColumns()
    Dim ColAry, i As Long, fc As Long
    Application.ScreenUpdating = False
    
    ColAry = Array("looptest", "StationName", "TestStatus", "IsFirstTest", _
      "TesterStartTime", "UnitStatus", "PO")
    
    With ActiveSheet
      For i = LBound(ColAry) To UBound(ColAry)
        fc = 0
        On Error Resume Next
        fc = Application.Match(ColAry(i), .Rows(1), 0)
        On Error GoTo 0
        If fc > 0 Then
          .Columns(fc).Delete
        End If
      Next i
    End With
    
    Application.ScreenUpdating = True
    End Sub
    Any suggestions?

    Thanks in advance for your time.
    ~ Phil

  2. #2
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,175
    Post Thanks / Like
    Mentioned
    470 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Macro Not Shown with Alt+F8

    Is that code in a normal module, or is it in a sheet module or the ThisWorkbook module?
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  3. #3
    Board Regular
    Join Date
    Sep 2014
    Posts
    120
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro Not Shown with Alt+F8

    Quote Originally Posted by Fluff View Post
    Is that code in a normal module, or is it in a sheet module or the ThisWorkbook module?
    Its in a module in my Personal.xlsb

    [IMG]X:\PhilipWhite\Capture.jpg[/IMG]

  4. #4
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,175
    Post Thanks / Like
    Mentioned
    470 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Macro Not Shown with Alt+F8

    Which module is it in?
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  5. #5
    Board Regular
    Join Date
    Sep 2014
    Posts
    120
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro Not Shown with Alt+F8

    Quote Originally Posted by Fluff View Post
    Which module is it in?

    VBAProject (Personal.xlsb)
    >>> Microsoft Excel Objects
    >>> Modules
    >>>>>> Macro_CleanFlexFlow

    I have never been able to figure out how to load a picture despite there being a tool for it in the toolbar, so I've tried to illustrate.

    I'm not sure how much clearer I can be. It is an ordinary module in the module folder under my Personal.xlsb. I have 14 other macros and custom functions in the same Module folder that show up just fine when I press Alt+F8. All of these modules have been renamed using the same naming convention as the one I can't see.

    Thanks for the assist,
    ~ Phil
    Last edited by Philip1957; Sep 6th, 2019 at 01:15 PM.

  6. #6
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,175
    Post Thanks / Like
    Mentioned
    470 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Macro Not Shown with Alt+F8

    Ok, if you press Alt F8 and scrolldown the list do you see something like
    Macro_CleanFlexFlow.DeleteColumns
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  7. #7
    Board Regular
    Join Date
    Sep 2014
    Posts
    120
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro Not Shown with Alt+F8

    Quote Originally Posted by Fluff View Post
    Ok, if you press Alt F8 and scrolldown the list do you see something like
    Macro_CleanFlexFlow.DeleteColumns
    Fluff,

    No I do not. That's my problem. Why does it not show up?
    I can't see anything wrong with the code (it runs as it should when executed manually from within the VBE.
    It is in the same location as my other macros, all of which show up in the Alt+F8 window.

    Thanks.

  8. #8
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,175
    Post Thanks / Like
    Mentioned
    470 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Macro Not Shown with Alt+F8

    There is no reason why it won't show, if it's in a normal module.
    If you have two macros with the same name they will appear in the dialogue box, but with the name of the module infront of the macro name.

    The only reason a macro won't show in the dialogue box (if it's in a normal module) is if it's prefaced with Private, or the macro requires arguments to be passed to it.
    Neither of which seem to be the case from your op.
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  9. #9
    Board Regular
    Join Date
    Sep 2014
    Posts
    120
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Macro Not Shown with Alt+F8

    Son-of-a-gun!

    I copied my code to notepad, and deleted the module. Then I created a new module and pasted the code from notepad back into the VBE.

    And now it shows in the Alt-F8 list. Don't ask me why, there is nothing different about the new module that I can see.

    Thanks for your time. I really appreciate it.

    ~ Phil

  10. #10
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,175
    Post Thanks / Like
    Mentioned
    470 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Macro Not Shown with Alt+F8

    Glad to hear you got it sorted & thanks for the feedback.
    Were there any other macros in that module and if so did they appear with F8?
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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