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
 
This particular module only contained a single macro.

Other modules in my Personal.xlsb with one or more macros each were all properly displayed in the F8 window.
 
Upvote 0

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
In that case it's possible you had
Code:
Option Private Module
at the very top of the module, before the code.
 
Upvote 0
Nope. Just
Code:
Option Explicit
.

My best guess is that the module got corrupted somehow.
 
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
This has helped me too. Many thanks , Philip for the sharing !
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,594
Members
452,654
Latest member
mememe101

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