My msgbox and inputBox sometimes... SOMETIMES... gets really slow. There can be as much as a 5 or 6 second lag between key inputs. This problem is intermittent.
I'm pretty advanced in my knowledge of VBA / Excel. I'm far from a beginner by any stretch of the imagination. I'm hoping someone reads this and know more about Excel's programming.
What I've tried so far: When my VBA program runs, I start off with the typical 3 (screen updating off, calculation to manual, enable events off). I also have a debug log setup within my program to record where code the program is and at what time. These checkpoints are all over my code. That sub looks like this:
Sub debugCheckpoint(subRoutine As String)
Dim printLine As String, Bench As Double
Call lethargicProgramCheck
If ActiveWorkbook.Name <> "Master Listing.xlsb" Then End
ThisWorkbook.checkpointCount = ThisWorkbook.checkpointCount + 1
subRoutine = "[" & ThisWorkbook.checkpointCount & "];" & ThisWorkbook.subStack & "; " & subRoutine
Application.CutCopyMode = False
printLine = subRoutine & "; T+Start:;" & Round(Timer - ThisWorkbook.startTimer, 5)
Open "I:\Text_and_Upload_Files\Text Files\ErrorLog.txt" For Append As #1
Print #1, printLine
Close #1
End Sub
My other sub looks something like this
call debugCheckpoint("LocationX")
Application.ScreenUpdating = True
msgbox ("This is your message", vbYesNo)
Application.ScreenUpdating = False
call debugCheckpoint("LocationY")
and my checkpoint text file records location x and y along with the long lag, but nothing in between.
Bookmarks