Deladier
Board Regular
- Joined
- May 4, 2005
- Messages
- 127
Hello everybody,
I did a Macro that saves my current Workbook by clicking a Button and shows 'symbolic' saving progress in Cell J18.
Problem is, that not always shows the saving progress since the first click, and I can't find the error.
Here's the Code:
Private Sub Saving_Click()
'Save Workbook
Application.ScreenUpdating = True
SaveChanges
End Sub
Sub SaveChanges()
Dim x As Integer, y As Integer
Application.ScreenUpdating = False
ActiveWorkbook.Save
Application.ScreenUpdating = True
'Delay in order to make visible for user the "saving progress" in Cell J18
For x = 0 To 100 Step 10
Sheet11.Range("J18").Value = x / 100
For y = 1 To 10000: Next y
Next x
For y = 1 To 10000: Next y
Sheet11.Range("J18").Value = 0
Sheet11.Range("A2").Select
Application.ScreenUpdating = True
Application.Speech.Speak "Changes Saved", True
End Sub
Thanks in advance.
I did a Macro that saves my current Workbook by clicking a Button and shows 'symbolic' saving progress in Cell J18.
Problem is, that not always shows the saving progress since the first click, and I can't find the error.
Here's the Code:
Private Sub Saving_Click()
'Save Workbook
Application.ScreenUpdating = True
SaveChanges
End Sub
Sub SaveChanges()
Dim x As Integer, y As Integer
Application.ScreenUpdating = False
ActiveWorkbook.Save
Application.ScreenUpdating = True
'Delay in order to make visible for user the "saving progress" in Cell J18
For x = 0 To 100 Step 10
Sheet11.Range("J18").Value = x / 100
For y = 1 To 10000: Next y
Next x
For y = 1 To 10000: Next y
Sheet11.Range("J18").Value = 0
Sheet11.Range("A2").Select
Application.ScreenUpdating = True
Application.Speech.Speak "Changes Saved", True
End Sub
Thanks in advance.