Macro Not Shown with Alt+F8

Philip1957

Board Regular
Joined
Sep 30, 2014
Messages
185
Office Version
  1. 365
Platform
  1. Windows
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
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Is that code in a normal module, or is it in a sheet module or the ThisWorkbook module?
 
Upvote 0
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

 
Upvote 0
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:
Upvote 0
Ok, if you press Alt F8 and scrolldown the list do you see something like
Macro_CleanFlexFlow.DeleteColumns
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 1
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?
 
Upvote 0

Forum statistics

Threads
1,223,950
Messages
6,175,582
Members
452,653
Latest member
craigje92

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top