I have a couple of macros in my PERSONAL.XLSB file. Both are assigned a keyboard shortcut, but only one works with the shortcut. It worked briefly, but not anymore.
This works:
This code will run fine if evoked manually, but will not run with the shortcut, despite being listed as a shortcut in the 'options' of the macro menu.
What could be the cause?
This works:
VBA Code:
Sub ShowAllCTRLEND()
'
' Keyboard Shortcut: Ctrl+q
'
If ActiveSheet.FilterMode = True Then
ActiveSheet.AutoFilter.ShowAllData
Cells.Find(What:="*", After:=[A1], SearchDirection:=xlPrevious).Select
Cells(ActiveCell.Row, 1).Select
ActiveCell.Offset(1, 3).Activate
Else
Cells.Find(What:="*", After:=[A1], SearchDirection:=xlPrevious).Select
Cells(ActiveCell.Row, 1).Select
ActiveCell.Offset(1, 3).Activate
End If
End Sub
This code will run fine if evoked manually, but will not run with the shortcut, despite being listed as a shortcut in the 'options' of the macro menu.
VBA Code:
Sub AlignRight()
'
' AlignRight Macro
'
' Keyboard Shortcut: Ctrl+Shift+R
'
With Selection
.HorizontalAlignment = xlRight
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
End Sub
What could be the cause?