glasstronomic
New Member
- Joined
- Apr 29, 2009
- Messages
- 10
- Office Version
- 365
Hi friends,
I'm a long time lurker and first time poster who needs help.
I have a complex project that works great, except for one issue that has me at wit's end.
It has many necessary loops with disciplined use of DoEvents and assuring no concurrent loops. It is intended for blind users who must operate it in conjunction with screen reader apps, so it depends heavily on accelerator keys and is mindful of focus conditions.
The problem is when the main UserForm named ControlPanel has focus, Alt+ accelerator keys work fine. But tapping or holding and releasing Alt without an accelerator key pauses execution and makes ControlPanel unresponsive until Alt is tapped again. This is especially problematic for blind users who don't get immediate feedback that this has occurred. As far as they can tell, the thing just stopped working. The fix of tapping again is in the readme, but y'all know about users and readme's.
I have beat my head against the wall all weekend while struggling with this. Even ChatGPT gave up and admitted it can't fix it after days of different attempts including Windows API calls, disabling Excel's default Alt key handling, modal and modeless form displays (the form must remain modeless for reader compatibility reasons), and many others. So many Debug.Print and so many failures.
Can you help? Code for ControlPanel...
FYI, the stuff I hid for privacy should not at all affect key commands. And the MouseLock calls do not involve any clicks, but rather only hover its pointer over a necessary area.
I'm a long time lurker and first time poster who needs help.
I have a complex project that works great, except for one issue that has me at wit's end.
It has many necessary loops with disciplined use of DoEvents and assuring no concurrent loops. It is intended for blind users who must operate it in conjunction with screen reader apps, so it depends heavily on accelerator keys and is mindful of focus conditions.
The problem is when the main UserForm named ControlPanel has focus, Alt+ accelerator keys work fine. But tapping or holding and releasing Alt without an accelerator key pauses execution and makes ControlPanel unresponsive until Alt is tapped again. This is especially problematic for blind users who don't get immediate feedback that this has occurred. As far as they can tell, the thing just stopped working. The fix of tapping again is in the readme, but y'all know about users and readme's.
I have beat my head against the wall all weekend while struggling with this. Even ChatGPT gave up and admitted it can't fix it after days of different attempts including Windows API calls, disabling Excel's default Alt key handling, modal and modeless form displays (the form must remain modeless for reader compatibility reasons), and many others. So many Debug.Print and so many failures.
Can you help? Code for ControlPanel...
VBA Code:
Option Explicit
#If VBA7 Then
' Sleep function for VBA7 (Excel 2010 and later)
Private Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
#Else
' Sleep function for older VBA versions (Excel 2007 and earlier)
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
#End If
Private Sub UserForm_Initialize()
' some stuff I have to hide for privacy, sorry, should not affect keyups or keydowns
End Sub
Private Sub UserForm_Activate()
cntrlPnl = True
isPausedBkwd = True
isPausedFwd = True
stopPlayback = False
zmLp = False
currentRow = 1
previousRow = 2
ProgressBar.Enabled = True
ProgressBar.Refresh
ProgressBar.Min = 1
ProgressBar.Max = lastRow
ProgressBar.Value = currentRow
If firstImport <> False Then stereoWide = True
If stereoWide = False Then
StereoWidth.Caption = "Stereo is narrow" & vbCrLf & "Key Alt+w"
StereoWidth.ControlTipText = "Stereo is narrow"
Else
StereoWidth.Caption = "Stereo is wide" & vbCrLf & "Key Alt+w"
StereoWidth.ControlTipText = "Stereo is wide"
End If
ImportedFileName.Caption = fileName
ImportedFileName.ControlTipText = fileName
DataPoints.Caption = lastRow & " data points"
DataPoints.ControlTipText = lastRow & " data points"
AmplitudeRange.Caption = Application.WorksheetFunction.Min(ws.Range("B1:B" & lastRow)) & " to " & Application.WorksheetFunction.Max(ws.Range("B1:B" & lastRow)) & " dBm"
AmplitudeRange.ControlTipText = Application.WorksheetFunction.Min(ws.Range("B1:B" & lastRow)) & " to " & Application.WorksheetFunction.Max(ws.Range("B1:B" & lastRow)) & " dBm"
FrequencySpan.Caption = Application.WorksheetFunction.Min(ws.Range("A1:A" & lastRow)) & " to " & Application.WorksheetFunction.Max(ws.Range("A1:A" & lastRow)) & " megahertz"
FrequencySpan.ControlTipText = Application.WorksheetFunction.Min(ws.Range("A1:A" & lastRow)) & " to " & Application.WorksheetFunction.Max(ws.Range("A1:A" & lastRow)) & " megahertz"
Speed.Caption = playSpeed & " milliseconds per point speed"
Speed.ControlTipText = playSpeed & " milliseconds per point speed"
UpdateReadouts
HalfSpeed.Caption = "Half Speed" & vbCrLf & vbCrLf & "Key Alt+7"
SlowDown1ms.Caption = "Go Slower by" & vbCrLf & "0.5 millisecond" & vbCrLf & "per point" & vbCrLf & vbCrLf & "Key Alt+8"
SpeedUp1ms.Caption = "Go Faster by" & vbCrLf & "0.5 millisecond" & vbCrLf & "per point" & vbCrLf & vbCrLf & "Key Alt+9"
DoubleSpeed.Caption = "Double Speed" & vbCrLf & vbCrLf & "Key Alt+0"
PlayBackward.Caption = "Play Backward" & vbCrLf & vbCrLf & "Key Alt+b"
Pause.Caption = "Pause" & vbCrLf & vbCrLf & "Key Alt+p"
PlayForward.Caption = "Play Forward" & vbCrLf & vbCrLf & "Key Alt+f"
ZoomLoop.Caption = "Zoom Loop is Off" & vbCrLf & vbCrLf & "Key Alt+z"
ZoomLoop.ControlTipText = "Zoom Loop is Off"
SkipBackward500Points.Caption = "Skip Backward" & vbCrLf & "500 points" & vbCrLf & vbCrLf & "Key Alt+h"
SkipBackward1Point.Caption = "Skip Backward" & vbCrLf & "1 point" & vbCrLf & vbCrLf & "Key Alt+j"
SkipForward1Point.Caption = "Skip Forward" & vbCrLf & "1 point" & vbCrLf & vbCrLf & "Key Alt+k"
SkipForward500Points.Caption = "Skip Forward" & vbCrLf & "500 points" & vbCrLf & vbCrLf & "Key Alt+l"
SkipToFirstPoint.Caption = "Skip to" & vbCrLf & "first point" & vbCrLf & vbCrLf & "Key Alt+1"
SkipToMidPoint.Caption = "Skip to" & vbCrLf & "middle point" & vbCrLf & vbCrLf & "Key Alt+2"
SkipToEndPoint.Caption = "Skip to" & vbCrLf & "last point" & vbCrLf & vbCrLf & "Key Alt+3"
StopClearAndImportNew.Caption = "Stop and" & vbCrLf & "clear data to" & vbCrLf & "import a new file" & vbCrLf & vbCrLf & "Key Alt+s"
Sleep 300
AllSoundsOff
SendMIDIControlChange 91, 10
SendMIDIControlChange 93, 0
SetPitchBendSensitivity 1, 48, 0
If stereoWide = True Then
StereoPanWide
Else
StereoPanNarrow
End If
ScrubPadsEnable
If lastRow <= 32767 Then
ScrubPad1.Max = lastRow
ScrubPad1.Value = Int(ControlPanel.ScrubPad1.Max / 2)
ScrubPadsUpdate
Else
ScrubPad1.Max = 32767
ScrubPad1.Value = Int(ControlPanel.ScrubPad1.Max / 2)
ScrubPadsUpdate
End If
If scrbPdMPos = False Then
quitPdMPos = True
MouseLock.Caption = "ScrubPad MouseLock is Off" & vbCrLf & "Key Alt+m"
MouseLock.ControlTipText = "ScrubPad MouseLock is Off"
Else
quitPdMPos = False
MouseLock.Caption = "ScrubPad MouseLock is On" & vbCrLf & "Key Alt+m"
MouseLock.ControlTipText = "ScrubPad MouseLock is On"
MonoAscending
If scrbPdMPos = True And msTmrRunning = False Then ScrbMouseTimer
End If
End Sub
Private Sub StereoWidth_Click()
If stereoWide = True Then
StereoWidth.Caption = "Stereo is narrow" & vbCrLf & "Key Alt+w"
StereoWidth.ControlTipText = "Stereo is narrow"
stereoWide = False
If isPausedBkwd = True And isPausedFwd = True Then StereoPanNarrow
Else
StereoWidth.Caption = "Stereo is wide" & vbCrLf & "Key Alt+w"
StereoWidth.ControlTipText = "Stereo is wide"
stereoWide = True
If isPausedBkwd = True And isPausedFwd = True Then StereoPanWide
End If
End Sub
Private Sub MouseLock_Click()
If scrbPdMPos = False Then
isPausedBkwd = True
isPausedFwd = True
scrbPdMPos = True
quitPdMPos = False
MouseLock.Caption = "ScrubPad MouseLock is On" & vbCrLf & "Key Alt+m"
MouseLock.ControlTipText = "ScrubPad MouseLock is On"
MonoAscending
ScrubPadsEnable
If scrbPdMPos = True And msTmrRunning = False Then ScrbMouseTimer
Else
isPausedBkwd = True
isPausedFwd = True
scrbPdMPos = False
quitPdMPos = True
MouseLock.Caption = "ScrubPad MouseLock is Off" & vbCrLf & "Key Alt+m"
MouseLock.ControlTipText = "ScrubPad MouseLock is Off"
MonoDescending
End If
End Sub
Private Sub HelpReadMe_Click()
isPausedBkwd = True
isPausedFwd = True
scrbPdMPos = False
quitPdMPos = True
MouseLock.Caption = "ScrubPad MouseLock is Off" & vbCrLf & "Key Alt+m"
MouseLock.ControlTipText = "ScrubPad MouseLock is Off"
MonoDescending
Sleep 200
HelpFileNotepad
Beeper
End Sub
Private Sub ProgressBar_Change()
If zmLp = True Then
If isPausedBkwd = True And isPausedFwd = True Then
currentRow = ProgressBar.Value
If zoomPreviousRow < currentRow And currentRow = zoomLastRow Then
ProgressBar.Value = zoomFirstRow
currentRow = zoomFirstRow
Else
If zoomPreviousRow > currentRow And currentRow = zoomFirstRow Then
ProgressBar.Value = zoomLastRow
currentRow = zoomLastRow
End If
End If
zoomPreviousRow = currentRow
CalcMIDIPan
SendMIDIControlChange 10, panMSB ' CC10 (MSB)
SendMIDIControlChange 42, panLSB ' CC42 (LSB)
SendMIDIPitchBend 1, pitchBendValue ' Channel 1
UpdateReadouts
End If
Else
If isPausedBkwd = True And isPausedFwd = True Then
currentRow = ProgressBar.Value
If previousRow < currentRow And currentRow = lastRow Then
ProgressBar.Value = 1
currentRow = 1
Else
If previousRow > currentRow And currentRow = 1 Then
ProgressBar.Value = lastRow
currentRow = lastRow
End If
End If
previousRow = currentRow
CalcMIDIPan
SendMIDIControlChange 10, panMSB ' CC10 (MSB)
SendMIDIControlChange 42, panLSB ' CC42 (LSB)
SendMIDIPitchBend 1, pitchBendValue ' Channel 1
UpdateReadouts
End If
End If
End Sub
Private Sub ProgressBar_Scroll()
If zmLp = True Then
If isPausedBkwd = True And isPausedFwd = True Then
currentRow = ProgressBar.Value
If zoomPreviousRow < currentRow And currentRow = zoomLastRow Then
ProgressBar.Value = zoomFirstRow
currentRow = zoomFirstRow
Else
If zoomPreviousRow > currentRow And currentRow = zoomFirstRow Then
ProgressBar.Value = zoomLastRow
currentRow = zoomLastRow
End If
End If
zoomPreviousRow = currentRow
CalcMIDIPan
SendMIDIControlChange 10, panMSB ' CC10 (MSB)
SendMIDIControlChange 42, panLSB ' CC42 (LSB)
SendMIDIPitchBend 1, pitchBendValue ' Channel 1
UpdateReadouts
End If
Else
If isPausedBkwd = True And isPausedFwd = True Then
currentRow = ProgressBar.Value
If previousRow < currentRow And currentRow = lastRow Then
ProgressBar.Value = 1
currentRow = 1
Else
If previousRow > currentRow And currentRow = 1 Then
ProgressBar.Value = lastRow
currentRow = lastRow
End If
End If
previousRow = currentRow
CalcMIDIPan
SendMIDIControlChange 10, panMSB ' CC10 (MSB)
SendMIDIControlChange 42, panLSB ' CC42 (LSB)
SendMIDIPitchBend 1, pitchBendValue ' Channel 1
UpdateReadouts
End If
End If
End Sub
Private Sub ScrubPad1_Scroll()
If isPausedBkwd = True And isPausedFwd = True Then
TimerReset
Timer2sec
If noteIsOn = False Then
SendMIDINoteOn 60
End If
ProgressBar.Value = ProgressBar.Value + ScrubPad1.Value - Int(ScrubPad1.Max / 2)
UpdateReadouts
ScrubPadsEnable
ScrubPad1.Value = Int(ScrubPad1.Max / 2)
End If
End Sub
Private Sub SlowDown1ms_Click()
If playSpeed + 0.5 <= 500 Then
playSpeed = playSpeed + 0.5
Else
playSpeed = 500
End If
Speed.Caption = playSpeed & " milliseconds per point speed"
Speed.ControlTipText = playSpeed & " milliseconds per point speed"
If isPausedBkwd = True And isPausedFwd = True Then PlayCurrent
End Sub
Private Sub HalfSpeed_Click()
If Int((playSpeed * 2) * 2 + 0.5) / 2 <= 500 Then
playSpeed = Int((playSpeed * 2) * 2 + 0.5) / 2
Else
playSpeed = 500
End If
Speed.Caption = playSpeed & " milliseconds per point speed"
Speed.ControlTipText = playSpeed & " milliseconds per point speed"
If isPausedBkwd = True And isPausedFwd = True Then PlayCurrent
End Sub
Private Sub DoubleSpeed_Click()
If Int(playSpeed + 0.5) / 2 >= 1 Then
playSpeed = Int(playSpeed + 0.5) / 2
Else
playSpeed = 0.5
End If
Speed.Caption = playSpeed & " milliseconds per point speed"
Speed.ControlTipText = playSpeed & " milliseconds per point speed"
If isPausedBkwd = True And isPausedFwd = True Then PlayCurrent
End Sub
Private Sub SpeedUp1ms_Click()
If playSpeed >= 1 Then
playSpeed = playSpeed - 0.5
Else
playSpeed = 0.5
End If
Speed.Caption = playSpeed & " milliseconds per point speed"
Speed.ControlTipText = playSpeed & " milliseconds per point speed"
If isPausedBkwd = True And isPausedFwd = True Then PlayCurrent
End Sub
Private Sub SkipBackward500Points_Click()
If zmLp = False Then
If currentRow > 501 Then
previousRow = 0
currentRow = currentRow - 500
ProgressBar.Value = currentRow
UpdateReadouts
previousRow = currentRow + 1
Else
previousRow = 0
currentRow = 1
ProgressBar.Value = currentRow
UpdateReadouts
previousRow = 2
End If
End If
If zmLp = True Then
If currentRow > zoomFirstRow + 500 Then
zoomPreviousRow = zoomFirstRow - 1
currentRow = currentRow - 500
ProgressBar.Value = currentRow
UpdateReadouts
zoomPreviousRow = currentRow + 1
Else
zoomPreviousRow = zoomFirstRow - 1
currentRow = zoomFirstRow
ProgressBar.Value = currentRow
UpdateReadouts
zoomPreviousRow = currentRow + 1
End If
End If
If isPausedBkwd = True And isPausedFwd = True Then PlayDing
End Sub
Private Sub SkipBackward1Point_Click()
If zmLp = False Then
If currentRow > 1 Then
previousRow = 0
currentRow = currentRow - 1
ProgressBar.Value = currentRow
UpdateReadouts
previousRow = currentRow + 1
End If
End If
If zmLp = True Then
If currentRow > zoomFirstRow Then
zoomPreviousRow = zoomFirstRow - 1
currentRow = currentRow - 1
ProgressBar.Value = currentRow
UpdateReadouts
zoomPreviousRow = currentRow + 1
End If
End If
If isPausedBkwd = True And isPausedFwd = True Then PlayDing
End Sub
Private Sub SkipForward1Point_Click()
If zmLp = False Then
If currentRow < lastRow Then
previousRow = lastRow + 1
currentRow = currentRow + 1
ProgressBar.Value = currentRow
UpdateReadouts
previousRow = currentRow - 1
End If
End If
If zmLp = True Then
If currentRow < zoomLastRow Then
zoomPreviousRow = zoomLastRow + 1
currentRow = currentRow + 1
ProgressBar.Value = currentRow
UpdateReadouts
zoomPreviousRow = currentRow - 1
End If
End If
If isPausedBkwd = True And isPausedFwd = True Then PlayDing
End Sub
Private Sub SkipForward500Points_Click()
If zmLp = False Then
If currentRow <= lastRow - 500 Then
previousRow = lastRow + 1
currentRow = currentRow + 500
ProgressBar.Value = currentRow
UpdateReadouts
previousRow = currentRow - 1
Else
previousRow = lastRow + 1
currentRow = lastRow
ProgressBar.Value = currentRow
UpdateReadouts
previousRow = currentRow - 1
End If
End If
If zmLp = True Then
If currentRow <= zoomLastRow - 500 Then
zoomPreviousRow = zoomLastRow + 1
currentRow = currentRow + 500
ProgressBar.Value = currentRow
UpdateReadouts
zoomPreviousRow = currentRow - 1
Else
zoomPreviousRow = zoomLastRow + 1
currentRow = zoomLastRow
ProgressBar.Value = currentRow
UpdateReadouts
zoomPreviousRow = currentRow - 1
End If
End If
If isPausedBkwd = True And isPausedFwd = True Then PlayDing
End Sub
Private Sub PlayBackward_Click()
AllNotesOff
stopPlayback = False
If isPausedBkwd = False Then
isPausedBkwd = True
quitPdMPos = False
ProgressBar.Value = currentRow
UpdateReadouts
ScrubPadsEnable
If scrbPdMPos = True And msTmrRunning = False Then ScrbMouseTimer
Else
isPausedFwd = True
isPausedBkwd = False
quitPdMPos = True
ScrubPadsDisable
BackwardPlay
ProgressBar.Value = currentRow
UpdateReadouts
End If
End Sub
Private Sub Pause_Click()
AllNotesOff
quitPdMPos = False
If isPausedBkwd = True And isPausedFwd = True Then PlayDing
isPausedBkwd = True
isPausedFwd = True
ProgressBar.Value = currentRow
UpdateReadouts
ScrubPadsEnable
If scrbPdMPos = True And msTmrRunning = False Then ScrbMouseTimer
End Sub
Private Sub PlayForward_Click()
AllNotesOff
stopPlayback = False
If isPausedFwd = False Then
isPausedFwd = True
quitPdMPos = False
ProgressBar.Value = currentRow
UpdateReadouts
ScrubPadsEnable
If scrbPdMPos = True And msTmrRunning = False Then ScrbMouseTimer
Else
isPausedBkwd = True
isPausedFwd = False
quitPdMPos = True
ScrubPadsDisable
ForwardPlay
ProgressBar.Value = currentRow
UpdateReadouts
End If
End Sub
Private Sub ZoomLoop_Click()
If zmLp = True Then
isPausedBkwd = True
isPausedFwd = True
zmLp = False
currentRow = previousRow
lastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row
ProgressBar.Min = 1
ProgressBar.Max = lastRow
If stereoWide = True Then
StereoPanWide
Else
StereoPanNarrow
End If
playSpeed = previousSpeed
Speed.Caption = playSpeed & " milliseconds per point speed"
Speed.ControlTipText = playSpeed & " milliseconds per point speed"
UpdateReadouts
ZoomLoop.Caption = "Zoom Loop is Off" & vbCrLf & vbCrLf & "Key Alt+z"
ZoomLoop.ControlTipText = "Zoom Loop is Off"
Else
isPausedBkwd = True
isPausedFwd = True
quitPdMPos = True
previousRow = currentRow
previousSpeed = playSpeed
SetZoomStart
If StrPtr(zoomLowInput) = 0 Then
GoTo QuitZmLp
ElseIf zoomLowInput = vbNullString Then
GoTo QuitZmLp
End If
SetZoomEnd
If StrPtr(zoomHighInput) = 0 Then
GoTo QuitZmLp
ElseIf zoomHighInput = vbNullString Then
GoTo QuitZmLp
End If
zmLp = True
currentRow = zoomFirstRow
lastRow = zoomLastRow
UpdateReadouts
ProgressBar.Min = zoomFirstRow
ProgressBar.Max = zoomLastRow
ZoomLoop.Caption = "Zoom Loop is On" & vbCrLf & vbCrLf & Format(ws.Cells(currentRow, "A").Value, "#000.0000") & vbCrLf & " to " & vbCrLf & Format(ws.Cells(zoomLastRow, "A").Value, "#000.0000") & vbCrLf & vbCrLf & "Key Alt+z"
ZoomLoop.ControlTipText = "Zoom Loop is On " & Format(ws.Cells(currentRow, "A").Value, "#000.0000") & " to " & Format(ws.Cells(zoomLastRow, 1).Value, "#000.0000")
If stereoWide = True Then
StereoPanWide
Else
StereoPanNarrow
End If
zoomPreviousRow = zoomFirstRow + 1
If playSpeed * (zoomLastRow - zoomFirstRow) < 2500 Then playSpeed = Int(2500 / (zoomLastRow - zoomFirstRow))
Speed.Caption = playSpeed & " milliseconds per point speed"
Speed.ControlTipText = playSpeed & " milliseconds per point speed"
End If
QuitZmLp:
ScrubPadsEnable
quitPdMPos = False
If scrbPdMPos = True And msTmrRunning = False Then ScrbMouseTimer
End Sub
Private Sub SkipToFirstPoint_Click()
If zmLp = False Then
previousRow = 0
currentRow = 1
ProgressBar.Value = 1
previousRow = currentRow + 1
UpdateReadouts
Else
zoomPreviousRow = zoomFirstRow - 1
currentRow = zoomFirstRow
ProgressBar.Value = zoomFirstRow
zoomPreviousRow = currentRow + 1
UpdateReadouts
End If
If isPausedBkwd = True And isPausedFwd = True Then PlayDing
End Sub
Private Sub SkipToMidPoint_Click()
If zmLp = False Then
currentRow = Int(lastRow / 2)
ProgressBar.Value = Int(lastRow / 2)
UpdateReadouts
Else
currentRow = zoomFirstRow + Int((zoomLastRow - zoomFirstRow) / 2)
ProgressBar.Value = zoomFirstRow + Int((zoomLastRow - zoomFirstRow) / 2)
UpdateReadouts
End If
If isPausedBkwd = True And isPausedFwd = True Then PlayDing
End Sub
Private Sub SkipToEndPoint_Click()
If zmLp = False Then
previousRow = lastRow + 1
currentRow = lastRow
ProgressBar.Value = lastRow
previousRow = lastRow - 1
UpdateReadouts
Else
zoomPreviousRow = zoomLastRow + 1
currentRow = zoomLastRow
ProgressBar.Value = zoomLastRow
zoomPreviousRow = zoomLastRow - 1
UpdateReadouts
End If
If isPausedBkwd = True And isPausedFwd = True Then PlayDing
End Sub
Private Sub StopClearAndImportNew_Click()
ScrubPadsDisable
ProgressBar.Enabled = False
AllSoundsOff
cntrlPnl = False
quitPdMPos = True
isPausedBkwd = True
isPausedFwd = True
stopPlayback = True
firstImport = False
zmLp = False
'TimerReset
' Clean up and unload
Call StrikeIconTskbar(Me)
CleanupMIDI
Application.DisplayAlerts = False
On Error Resume Next
Unload Me
Start_Over
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
ScrubPadsDisable
ProgressBar.Enabled = False
AllSoundsOff
cntrlPnl = False
quitPdMPos = True
isPausedBkwd = True
isPausedFwd = True
stopPlayback = True
firstImport = False
zmLp = False
previousSpeed = playSpeed
CleanupMIDI
Unload Me
If CloseMode = vbFormControlMenu Then
Call StrikeIconTskbar(Me)
Application.Visible = True
ThisWorkbook.Saved = True
Unload Me
Beeper
CleanupMIDI
Application.Quit
End If
End Sub
FYI, the stuff I hid for privacy should not at all affect key commands. And the MouseLock calls do not involve any clicks, but rather only hover its pointer over a necessary area.
Last edited by a moderator: