Autres probleme avec les macro

Boostez vos compétences Excel avec notre communauté !

Rejoignez Excel Downloads, le rendez-vous des passionnés où l'entraide fait la force. Apprenez, échangez, progressez – et tout ça gratuitement ! 👉 Inscrivez-vous maintenant !

samia89

XLDnaute Nouveau
bonjour tt le monde j'ai besoin de votre aide SVP je galère de puis plusieurs heurs a essayer de rendre cet macro fonctionnel avec userform qui ce compose d'une ComboBox1 et un bouton
la macro elle fonction très bien sur la feuil (feuil3; la cellule "H1"= insertion Numéro Employé et un bouton qui me permit de valider et d'afficher les information de Employé sur la feuil3)

alors je souhait bien d'avoir un userform avec une ComboBox1 qui va remplacer La cellule "H1" qui se charge automatiquement de la feuil Employé au démarrage de userform de un bouton qui me permit de valider et d'afficher les information de Employé sur la feuil3 )

voila la macro elle fonction très très bien

VB:
Sub Rectangleàcoinsarrondis1_Clic()

Dim x As Long
Dim y As Long

x = Sheets("Employe").Range("A" & Rows.Count).End(xlUp).Row

For y = 2 To x
If Feuil3.Range("H1").Value = Employe.Cells(y, "A").Value Then

Feuil3.Range("B7").Value = Employe.Cells(y, "A").Value
Feuil3.Range("B8").Value = Employe.Cells(y, "B").Value
Feuil3.Range("B9").Value = Employe.Cells(y, "C").Value
Feuil3.Range("B10").Value = Employe.Cells(y, "D").Value
Feuil3.Range("B11").Value = Employe.Cells(y, "E").Value
Feuil3.Range("B12").Value = Employe.Cells(y, "F").Value
Feuil3.Range("B13").Value = Employe.Cells(y, "G").Value
Feuil3.Range("B14").Value = Employe.Cells(y, "H").Value
Feuil3.Range("B15").Value = Employe.Cells(y, "I").Value
Feuil3.Range("B16").Value = Employe.Cells(y, "J").Value
Feuil3.Range("B17").Value = Employe.Cells(y, "K").Value
Feuil3.Range("B18").Value = Employe.Cells(y, "L").Value
Feuil3.Range("B19").Value = Employe.Cells(y, "M").Value
Feuil3.Range("B20").Value = Employe.Cells(y, "N").Value
Feuil3.Range("B21").Value = Employe.Cells(y, "O").Value
Feuil3.Range("B22").Value = Employe.Cells(y, "P").Value
Feuil3.Range("B23").Value = Employe.Cells(y, "R").Value
End If
Next y
Dim i As Picture
Dim j As String
On Error Resume Next
If Target.Address = Range("H1").Address Then
ActiveSheet.Pictures.Delete
j = "C:\Photos\" & Range("H1") & Value & ".jpg"
With Range("E8")
Set i = ActiveSheet.Pictures.Insert(j)
i.Height = 105
i.Width = 95
i.Top = 110
i.Left = .Left
i.Placement = xlMoveAndSize
End With
End If
End Sub


et un grand merci pour vous tous bonne journée
 
- Navigue sans publicité
- Accède à Cléa, notre assistante IA experte Excel... et pas que...
- Profite de fonctionnalités exclusives
Ton soutien permet à Excel Downloads de rester 100% gratuit et de continuer à rassembler les passionnés d'Excel.
Je deviens Supporter XLD

Discussions similaires

  • Question Question
Microsoft 365 Export données
Réponses
4
Affichages
498
Réponses
3
Affichages
591
  • Question Question
Microsoft 365 VBA Transpose
Réponses
11
Affichages
738
Réponses
9
Affichages
381
Réponses
1
Affichages
466
Réponses
0
Affichages
378
Réponses
3
Affichages
508
Retour