bonjour a tous
Je voudrai savoir si il est possible d'affecter une macro a un bouton active x ?
sur ma feuille 1 exel j'ai bouton 1 , bouton 2, bouton 3 , bouton 4
quand je clic sur bouton 1 il devient bleu , quand je clic sur bouton 2 il devient bleu et le bouton 1 passe au vert ainsi de suite.
maintenant sur le bouton 1 ( feuille 1 ) , je vourdrai rajouter en plus de la couleur , lui attribuer une macro pour aller sur la feuille 2
est ce possible ?
voici les codes que j'ai utilise :
Private Sub CommandButton1_Click()
Range("A1") = "Oui"
CommandButton1.BackColor = RGB(0, 0, 240)
CommandButton2.BackColor = RGB(0, 240, 0)
End Sub
Private Sub CommandButton2_Click()
Range("A1") = "Non"
CommandButton1.BackColor = RGB(0, 240, 0)
CommandButton2.BackColor = RGB(0, 0, 240)
End Sub
Private Sub CommandButton3_Click()
Range("A1") = "Non"
CommandButton2.BackColor = RGB(0, 240, 0)
CommandButton3.BackColor = RGB(0, 0, 240)
End Sub
Private Sub CommandButton4_Click()
Range("A1") = "Non"
CommandButton3.BackColor = RGB(0, 240, 0)
CommandButton4.BackColor = RGB(0, 0, 240)
End Sub
Private Sub CommandButton5_Click()
Range("A1") = "Non"
CommandButton4.BackColor = RGB(0, 240, 0)
CommandButton5.BackColor = RGB(0, 0, 240)
CommandButton5.BackColor = RGB(0, 240, 0)
End Sub
Merci pour votre collaboration .( je vous joint lefichier
Je voudrai savoir si il est possible d'affecter une macro a un bouton active x ?
sur ma feuille 1 exel j'ai bouton 1 , bouton 2, bouton 3 , bouton 4
quand je clic sur bouton 1 il devient bleu , quand je clic sur bouton 2 il devient bleu et le bouton 1 passe au vert ainsi de suite.
maintenant sur le bouton 1 ( feuille 1 ) , je vourdrai rajouter en plus de la couleur , lui attribuer une macro pour aller sur la feuille 2
est ce possible ?
voici les codes que j'ai utilise :
Private Sub CommandButton1_Click()
Range("A1") = "Oui"
CommandButton1.BackColor = RGB(0, 0, 240)
CommandButton2.BackColor = RGB(0, 240, 0)
End Sub
Private Sub CommandButton2_Click()
Range("A1") = "Non"
CommandButton1.BackColor = RGB(0, 240, 0)
CommandButton2.BackColor = RGB(0, 0, 240)
End Sub
Private Sub CommandButton3_Click()
Range("A1") = "Non"
CommandButton2.BackColor = RGB(0, 240, 0)
CommandButton3.BackColor = RGB(0, 0, 240)
End Sub
Private Sub CommandButton4_Click()
Range("A1") = "Non"
CommandButton3.BackColor = RGB(0, 240, 0)
CommandButton4.BackColor = RGB(0, 0, 240)
End Sub
Private Sub CommandButton5_Click()
Range("A1") = "Non"
CommandButton4.BackColor = RGB(0, 240, 0)
CommandButton5.BackColor = RGB(0, 0, 240)
CommandButton5.BackColor = RGB(0, 240, 0)
End Sub
Merci pour votre collaboration .( je vous joint lefichier