I customized some key strokes to launch forms in two different workbooks. For some reason, if I have multiple workbooks open, the custom key strokes no longer work, but they do work when only one workbook is open.
Here's the code that I have. Both are stored in their respective ThisWorkbook objects.
FLP Workbook
OD_Dep Workbook
Here's the code that I have. Both are stored in their respective ThisWorkbook objects.
FLP Workbook
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnKey "^\"
End Sub
Private Sub Workbook_Open()
Application.OnKey "^\", "LoadFLRTemp"
Application.ScreenUpdating = False
Dim ws As Worksheet
For Each ws In Worksheets
If Not ws.Name = "Variables" Then
If ws.FilterMode = True Then
ws.ShowAllData
Else
End If
With ws.UsedRange.Cells
.Font.Name = "Calibri"
.Font.Size = 10
.Borders.LineStyle = xlContinuous
.EntireColumn.AutoFit
End With
End If
Next ws
Application.ScreenUpdating = True
End Sub
OD_Dep Workbook
Code:
Private Sub Workbook_Open()
frm_ODDepFrontPage.Show
Application.OnKey "^=", "LoadODDepFrontPage"
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnKey "^="
End Sub