Bonjour,
Je voudrais savoir s'il y avait un code VBA pour dire "Attention veuillez... etc) à l’exécution de ma macro ?
Voici le code : où pourrais-je ajouter cette alerte ?
Private Sub CommandButtonTransfert2_Click() 'Transfert des nouvelles cotations
If Not Flag Then Exit Sub
Dim F As Worksheet, i&, lig As Variant
Set F = Sheets("SAISIE DES DONNEES")
Application.ScreenUpdating = False
With [A13].CurrentRegion
For i = .Rows.Count To 2 Step -1
If .Cells(i, 15) = 4 Then 'Statut
lig = Application.Match(.Cells(i, 1), F.Columns(1), 0)
If IsNumeric(lig) Then
F.Cells(lig, 1).Resize(, 4) = .Cells(i, 1).Resize(, 4).Value
F.Cells(lig, 6).Resize(, 2) = .Cells(i, 5).Resize(, 2).Value
F.Cells(lig, 8).Resize(, 2) = .Cells(i, 12).Resize(, 2).Value 'Sev, Occ
F.Cells(lig, 12) = .Cells(i, 14) 'Det
.Rows(i).Delete xlUp 'supprime la ligne
End If
End If
Next
End With
Flag = False
End Sub
Merci
Je voudrais savoir s'il y avait un code VBA pour dire "Attention veuillez... etc) à l’exécution de ma macro ?
Voici le code : où pourrais-je ajouter cette alerte ?
Private Sub CommandButtonTransfert2_Click() 'Transfert des nouvelles cotations
If Not Flag Then Exit Sub
Dim F As Worksheet, i&, lig As Variant
Set F = Sheets("SAISIE DES DONNEES")
Application.ScreenUpdating = False
With [A13].CurrentRegion
For i = .Rows.Count To 2 Step -1
If .Cells(i, 15) = 4 Then 'Statut
lig = Application.Match(.Cells(i, 1), F.Columns(1), 0)
If IsNumeric(lig) Then
F.Cells(lig, 1).Resize(, 4) = .Cells(i, 1).Resize(, 4).Value
F.Cells(lig, 6).Resize(, 2) = .Cells(i, 5).Resize(, 2).Value
F.Cells(lig, 8).Resize(, 2) = .Cells(i, 12).Resize(, 2).Value 'Sev, Occ
F.Cells(lig, 12) = .Cells(i, 14) 'Det
.Rows(i).Delete xlUp 'supprime la ligne
End If
End If
Next
End With
Flag = False
End Sub
Merci