Код на обновление запросов в PQ
Sub UpdateQueryAll()
ActiveWorkbook.RefreshAll
End Sub
Код для ProgressBar
Private Sub Main()
Dim j As String
j = 10000
For i = 1 To j
Call progress(i / j)
Next
Unload UserForm1
End Sub
Sub progress(Procent)
With UserForm1
.LabelProgress.Width = Procent * (.FrameProgress.Width)
.Label1.Caption = Format(Procent, "0%" & "Completed")
.Repaint
End With
End Sub
Private Sub UserForm_Activate()
Call Main
End Sub
а также, код в модуле
Sub ShowProgress()
UserForm1.Show
End Sub
Sub UpdateQueryAll()
ActiveWorkbook.RefreshAll
End Sub
Код для ProgressBar
Private Sub Main()
Dim j As String
j = 10000
For i = 1 To j
Call progress(i / j)
Next
Unload UserForm1
End Sub
Sub progress(Procent)
With UserForm1
.LabelProgress.Width = Procent * (.FrameProgress.Width)
.Label1.Caption = Format(Procent, "0%" & "Completed")
.Repaint
End With
End Sub
Private Sub UserForm_Activate()
Call Main
End Sub
а также, код в модуле
Sub ShowProgress()
UserForm1.Show
End Sub