Il giorno lunedì 16 maggio 2016 12:01:09 UTC+2, Simone B. ha scritto:
Lascia stare l'ultimo post, credo mi convenga eliminare il controllo ActiveX e per simulare la barra me la costruisco con 2 rettangoli chiamati boxProg e boxMax
Public Sub Progressbar(Totale As Long, Progress As Long)
Me.boxProg.Width = 0.992 * Me.BoxMax.Width * (Progress / Totale)
Me.Repaint
End Sub
poi nella maschera uso un comando pause per vedere l'avanzamento
Public Function Pause(NumberOfSeconds As Variant)
On Error GoTo Err_Pause
Dim PauseTime As Variant, start As Variant
PauseTime = NumberOfSeconds
start = Timer
Do While Timer < start + PauseTime
DoEvents
Loop
Exit_Pause:
Exit Function
Err_Pause:
MsgBox Err.Number & " - " & Err.Description, vbCritical, "Pause()"
Resume Exit_Pause
End Function
Private Sub Form_Timer()
Call Progressbar(100, 10)
Pause (0.3)
Call Progressbar(100, 20)
Pause (0.3)
Call Progressbar(100, 30)
Pause (0.3)
Call Progressbar(100, 40)
Pause (0.3)
Call Progressbar(100, 50)
Pause (0.3)
Call Progressbar(100, 60)
Pause (0.3)
Call Progressbar(100, 70)
Pause (0.3)
Call Progressbar(100, 80)
Pause (0.3)
Call Progressbar(100, 90)
Pause (0.3)
Call Progressbar(100, 100)
DoCmd.Close
End Sub