Reply To: fileclose pjDoNotSave – but still getting prompt to save

Home Forums Discussion Forum fileclose pjDoNotSave – but still getting prompt to save Reply To: fileclose pjDoNotSave – but still getting prompt to save

#6379
Martin,
I see nothing wrong with your code.  I know this may sound strange, but on occasion, I have had to slow processes down so that a single "complex" or "time" consuming process can completely finish before executing the next step.  I have had to add a  Timer function following some commands to get them to process correctly.  It usually takes only one second to clear the way, but it works.
Try inserting a Timer following the Tool bar deletion prior to FileClose.  Since I can’t see anything wrong with your code, I have no idea of anthing else to try.
Here’s a trimmed down example from the VB Help screen.
Dim PauseTime, Start
    PauseTime = 1    ' Set duration.
    Start = Timer    ' Set start time.
    Do While Timer < Start + PauseTime
        DoEvents    ' Yield to other processes.
    Loop