hi
win2k, xp
excel 2k
I have an excel application with a form which, when initialized brings about a message with a yes/no option. if yes, then it initialize the progressbar with min and max and then opens the progressbar form. but it does not work. all that happens is that the progressbar shows up but none of the routines run and the progressbar remains blank. can anyone help?
Code:
Private Sub UserForm_Initialize()
On Error Resume Next
Dim MYANS As String
MYANS = MsgBox("Do you want REFRESH the reports?.", vbYesNo, "Refresh REPORTS..")
If MYANS = vbYes Then
Progress_bar.Test
End If
End Sub
Private Sub UserForm_Initialize()
Progress_bar.ProgressBar1.Min = 1
Progress_bar.ProgressBar1.Max = 6
End Sub
Public Sub Test()
Dim pr_bar As Integer
pr_bar = 1
Me.Show
Call refload_weekly_for_el
pr_bar = pr_bar + 1
Progress_bar.ProgressBar1.Value = pr_bar
Call refload_weekly_for_sp
pr_bar = pr_bar + 1
Progress_bar.ProgressBar1.Value = pr_bar
Call refload_weekly_for_em
pr_bar = pr_bar + 1
Progress_bar.ProgressBar1.Value = pr_bar
Call refresh_daily_for_el
pr_bar = pr_bar + 1
Progress_bar.ProgressBar1.Value = pr_bar
Call refresh_daily_for_sp
pr_bar = pr_bar + 1
Progress_bar.ProgressBar1.Value = pr_bar
Call refresh_daily_for_em
pr_bar = pr_bar + 1
Progress_bar.ProgressBar1.Value = pr_bar
If pr_bar = 6 Then
Unload Progress_bar
Exit Sub
End If
End Sub