Philip1957
Board Regular
- Joined
- Sep 30, 2014
- Messages
- 185
- Office Version
- 365
- Platform
- 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.
Any suggestions?
Thanks in advance for your time.
~ Phil
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