Auteur |
Message |
dubdub87 Junior |
userform ligne jaune
bonjours
j'ai plusieurs onglets un userform (matières) s'occupe de trois onglets sa c bon,
comme ceci:
Private Sub Workbook_Open()
ComboBox1.ListFillRange = "listes!A3:A14"
End Sub
Private Sub cbomatières_Change()
End Sub
Private Sub cmdajouter_Click()
Dim ref_prod, matières_prod, marque_prod, couleur_prod, qte_prod As String
Dim set_focus_on As String
Dim derligne As Integer
ref_prod = txtreferences.Value
matières_prod = cbomatières.Value
marque_prod = txtmarques.Value
couleur_prod = cbocouleurs.Value & " " & txtprecision.Value
qte_prod = ComboBox1.Value
set_focus_on = cbomatières.Value
derligne = Worksheets(set_focus_on).Range("a65536").End(xlUp).Row + 1
Worksheets(set_focus_on).Activate
Worksheets(set_focus_on).Cells(derligne, 1).Value = ref_prod
Worksheets(set_focus_on).Cells(derligne, 2).Value = matières_prod
Worksheets(set_focus_on).Cells(derligne, 3).Value = marque_prod
Worksheets(set_focus_on).Cells(derligne, 4).Value = couleur_prod
Worksheets(set_focus_on).Cells(derligne, 5).Value = qte_prod
frmajoutermatiéres.Hide
' Dim numLigneVide As Integer
' Worksheet("huiles").Activate
' numLigneVide = ActiveSheet.columna(1).Find("").Row
End Sub
Private Sub cmdfermer_Click()
frmajoutermatiéres.Hide
End Sub
mais un userform (pinceaux) dois lui remplir un onglet different, sauf que quand je clic sur ajouter il me met "cmdajouter_clic en jaune :
Private Sub cmdajouter_Click()
Dim pinceaux As Integer
Dim marque_prod, dimensions_prod, Formes_prod, quantités_prod As String
Dim set_focus_on As String
Dim derligne As Integer
marques_prod = txtmarques.Value
dimensions_prod = cbodimensions.Value
quantités_prod = cboquantités.Value
set_focus_on = pinceaux.Value
derligne = Worksheets(set_focus_on).Range("a65536").End(xlUp).Row + 1
Worksheets(set_focus_on).Activate
Worksheets(set_focus_on).Cells(derligne, 2).Value = marques_prod
Worksheets(set_focus_on).Cells(derligne, 3).Value = dimensions_prod
Worksheets(set_focus_on).Cells(derligne, 4).Value = Formes_prod
Worksheets(set_focus_on).Cells(derligne, 5).Value = qte_prod
frmpinceaux.Hide
' Dim numLigneVide As Integer
' Worksheet("huiles").Activate
' numLigneVide = ActiveSheet.columna(1).Find("").Row
End Sub
Private Sub cmdfermer_Click()
frmpinceaux.Hide
End Sub
si quelqu'un a une idée svp merci d'avance
|
03 Oct 2012 @ 18:25 |
| Heure GMT |
[Répondre] |
|
Administration:
Ouvrir / Fermer / Supprimer /
Déplacer
|
|