Bonjour,
bien qu'elle ne soit pas nécessaire (c'est juste pour comprendre ), je souhaite intégrer une barre de progression dans le code VBA ci-après, mais je n'arrive pas à le mettre au bon endroit !!
Si quelqu'un peux m'aider.
Code barre progression :
Sub Attente()
F_BarreAttente.Show
F_BarreAttente.Caption = "20%"
F_BarreAttente.Label1.Width = 20
DoEvents
For a = 1 To 100000000: Next a
F_BarreAttente.Caption = "60%"
F_BarreAttente.Label1.Width = 60
DoEvents
For a = 1 To 100000000: Next a
F_BarreAttente.Caption = "100%"
F_BarreAttente.Label1.Width = 100
DoEvents
For a = 1 To 100000000: Next a
Unload F_BarreAttente
End Sub
Code VBA, installé dans une combobox liste déroulante
Private Sub Worksheet_Activate()
ComboBox2.Value = "Sélectionner une filiale"
ActiveWindow.WindowState = xlMaximized
Application.WindowState = xlMaximized
End Sub
Private Sub ComboBox2_Click()
Sheets(ComboBox2.Text).Select
End Sub
Private Sub ComboBox2_DropButtonClick()
ComboBox2.Clear
For i = 1 To ActiveWorkbook.Sheets.Count
If Sheets(i).Name = "FILIALE 1" Or Sheets(i).Name = "FILIALE 2" Then
ComboBox2.AddItem Sheets(i).Name
End If
Next
End Sub
Ci joint fichier
Merci
A +
bien qu'elle ne soit pas nécessaire (c'est juste pour comprendre ), je souhaite intégrer une barre de progression dans le code VBA ci-après, mais je n'arrive pas à le mettre au bon endroit !!
Si quelqu'un peux m'aider.
Code barre progression :
Sub Attente()
F_BarreAttente.Show
F_BarreAttente.Caption = "20%"
F_BarreAttente.Label1.Width = 20
DoEvents
For a = 1 To 100000000: Next a
F_BarreAttente.Caption = "60%"
F_BarreAttente.Label1.Width = 60
DoEvents
For a = 1 To 100000000: Next a
F_BarreAttente.Caption = "100%"
F_BarreAttente.Label1.Width = 100
DoEvents
For a = 1 To 100000000: Next a
Unload F_BarreAttente
End Sub
Code VBA, installé dans une combobox liste déroulante
Private Sub Worksheet_Activate()
ComboBox2.Value = "Sélectionner une filiale"
ActiveWindow.WindowState = xlMaximized
Application.WindowState = xlMaximized
End Sub
Private Sub ComboBox2_Click()
Sheets(ComboBox2.Text).Select
End Sub
Private Sub ComboBox2_DropButtonClick()
ComboBox2.Clear
For i = 1 To ActiveWorkbook.Sheets.Count
If Sheets(i).Name = "FILIALE 1" Or Sheets(i).Name = "FILIALE 2" Then
ComboBox2.AddItem Sheets(i).Name
End If
Next
End Sub
Ci joint fichier
Merci
A +