Ceci est une page optimisée pour les mobiles. Cliquez sur ce texte pour afficher la vraie page.

Macro qui ne marche pas ?

WDAndCo

XLDnaute Impliqué
Bonsoir le Forum je n'arrive pas a remplir un cellule avec le ComboBox2, Pourquoi ?
D'avance merci.

Private Sub CommandButton1_Click()
Range("M1") = ComboBox1.Value ' N° du Lot
TextBox4 = Range("R1") 'Libellés
TextBox5 = Range("Q1") 'Lieux
Dim lign As Integer
With UserForm3
TextBox5 = Range("Q1")
lign = .ComboBox1.ListIndex
If TextBox5 = ComboBox2.Value Then MsgBox "Mais cela ne sert a rien !", , "Message BASE"
If TextBox5 = ComboBox2.Value Then Exit Sub
If ComboBox2.Value = "" Then Exit Sub
Worksheets("Base").Cells(1 + lign, 5) = ComboBox2.Value
End With
UserForm3.Hide
Call Protege
End Sub
 

wilfried_42

XLDnaute Barbatruc
Re : Macro qui ne marche pas ?

bonsoir

Je ne connais pas ton programme mais ta combobox2 etant dans la structure With, ne manquerait il pas un point devant ?

Je dis cela mais c'est difficile à voir sans la vue d'ensemble
 

WDAndCo

XLDnaute Impliqué
Re : Macro qui ne marche pas ?

Re bonsoir et merci mais :

Worksheets("Base").Cells(1 + lign, 5) = ComboBox2.Value (Ne marche pas)
Worksheets("Base").Cells(1 + lign, 5) = .ComboBox2.Value (Ne marche pas)
Worksheets("Base").Cells(1 + lign, 5) = .ComboBox2 (Ne marche pas non plus)

Merci quand même.
 

WDAndCo

XLDnaute Impliqué
Re : Macro qui ne marche pas ?

Merci j'ai grâce a votre aide !

J'ai 4 UserForm le 3eme et 4eme sont peu différents j'ai BÊTEMENT repris la marco du 3 et coller et adapter pour le 4 mais j'ai laissé With UserForm3 et
UserForm3.Hide ! ! !

He Oui Bien vu ! ! ! Encore merci et une bonne soirée

Quel Nul je fais (j'ai honte !)
 

Discussions similaires

Réponses
4
Affichages
356
Les cookies sont requis pour utiliser ce site. Vous devez les accepter pour continuer à utiliser le site. En savoir plus…