PDA

View Full Version : Save Progress Bar Not Displayed



Adamski
01-18-2010, 06:42 AM
Hello,

I have discovered that when the Save method is invoked with ScreenUpdating set to false, the save progress bar doesn't show.

Is there any way to get it to display without turning ScreenUpdating on?

Cheers

Sub SaveIt()

Debug.Print "SaveIt"

'Set Excel State
Application.DisplayStatusBar = True
Application.ScreenUpdating = False

' Do Something
Application.StatusBar = "Before Save"
Range("A1") = "Don't Display This!"
Application.Wait Time + TimeSerial(0, 0, 2)
Application.StatusBar = False

' This needs to be on for the "Saving" progressbar to show
' Application.ScreenUpdating = True ' Uncomment for progressbar

ThisWorkbook.Save

' Do Something Else
Application.StatusBar = "After Save"
Range("A1") = "Saved"
Application.Wait Time + TimeSerial(0, 0, 2)
Application.StatusBar = False

' Restore Excel State
Application.ScreenUpdating = True

End Sub

lucas
01-18-2010, 09:42 AM
It shows in the status bar for me just as you have posted it.

2003

Adamski
01-18-2010, 10:05 AM
Really?! I've tried it on several computers and it hasn't worked on them.
I should have mentioned it's Excel 2003 on XP SP2 x32.

The attached workbook won't work for me. The Right-Click Event is set to save too. Does it work for you?

lucas
01-18-2010, 10:16 AM
Yes the statusbar messages show for me when I click the save button or right click on the sheet.

Adamski
01-18-2010, 10:28 AM
How strange. Maybe it is the way the computers are set up - seems unlikely there would be an option to affect that...

Thanks for the feedback.

lucas
01-18-2010, 10:34 AM
Surely somone else will come along and verify my experience or not....

I can't imagine what could be causing it.

mbarron
01-18-2010, 11:15 AM
Just for clarification.
I read your original question as being the displaying of a progress bar during the save, not the Before and After Save messages that you've added in code.

If that's indeed the question, I think the answer is no, you cannot display the progress bar with ScreenUpdating set to False.

Adamski
01-18-2010, 11:54 AM
Yes, that is what I meant - the normal save progress bar between the two custom messages.
OK, if that is the case I guess I put up with it. Annoying since the ScreenUpdating doesn't normally include the Statusbar.