Option Compare Text
Option Base 1
Private Sub MultiPage1_Change(): End Sub
'
'
'*************************************************************************************************
'PAGE coeff -->TbCoeff
Private Sub LstCoeff_Click()
With LstCoeff
TxtDesignationCoeff = .Value
TxtCoeffApplique = .List(.ListIndex, 1)
End With
End Sub
Private Sub BtAjoutCoeff_Click()
With Range("TbCoeff").ListObject
.ListRows.Add.Range.Value = Array(TxtDesignationCoeff, TxtCoeffApplique) 'on ajoute une ligne au tableau
End With
Alimenter_List LstCoeff, Range("TbCoeff").Value 'on remet la listbox a jour automatiquement
End Sub
Private Sub BtModifierCoeff_Click()
With Range("TbCoeff").ListObject
.ListRows(LstCoeff.ListIndex + 1).Range.Value = Array(TxtDesignationCoeff, TxtCoeffApplique) 'on modifie la ligne selectionnée
End With
Alimenter_List LstCoeff, Range("TbCoeff").Value 'on remet la listbox a jour automatiquement
TxtDesignationCoeff = "": TxtCoeffApplique = ""
End Sub
Private Sub BtSupprCoeff_Click()
With Range("TbCoeff").ListObject
.ListRows(LstCoeff.ListIndex + 1).Delete 'on supprime la ligne du tableau
End With
Alimenter_List LstCoeff, Range("TbCoeff").Value 'on remet la listbox a jour automatiquement
TxtDesignationCoeff = "": TxtCoeffApplique = ""
End Sub
'*************************************************************************************************
'*************************************************************************************************
'PAGE TRANSPORTEUR ACHAT -->TbTransporteur
Private Sub LstTransporteur_Click()
With LstTransporteur
TxtNomTransporteur = .Value
TxtPourcentage = .List(.ListIndex, 1)
End With
End Sub
Private Sub BtAjoutTransporteur_Click()
With Range("TbTransporteur").ListObject
.ListRows.Add.Range.Value = Array(TxtNomTransporteur, TxtPourcentage) 'on ajoute une ligne au tableau
End With
Alimenter_List LstTransporteur, Range("TbTransporteur").Value 'on remet la listbox a jour automatiquement
End Sub
Private Sub BtModifTransporteur_Click()
With Range("TbTransporteur").ListObject
.ListRows(LstTransporteur.ListIndex + 1).Range.Value = Array(TxtNomTransporteur, TxtPourcentage) 'on modifie la ligne selectionnée
End With
Alimenter_List LstTransporteur, Range("TbTransporteur").Value 'on remet la listbox a jour automatiquement
End Sub
Private Sub BtSupprTransporteur_Click()
With Range("TbTransporteur").ListObject
.ListRows(LstTransporteur.ListIndex + 1).Delete 'on supprime la ligne du tableau
End With
Alimenter_List LstTransporteur, Range("TbTransporteur").Value 'on remet la listbox a jour automatiquement
End Sub
'*************************************************************************************************
'*************************************************************************************************
' TOUT LES BOUTONS FERMER
Sub ferme_un_point_cest_tout(): Unload Me: End Sub
Private Sub BtFermerAcess_Click(): ferme_un_point_cest_tout: End Sub
Private Sub BtFermerCoeff_Click(): ferme_un_point_cest_tout: End Sub
Private Sub BtFermerCommCentrale_Click(): ferme_un_point_cest_tout: End Sub
Private Sub BtFermerCoutTrans_Click(): ferme_un_point_cest_tout: End Sub
Private Sub BtFermerEmballage_Click(): ferme_un_point_cest_tout: End Sub
Private Sub BtFermerEtiquette_Click(): ferme_un_point_cest_tout: End Sub
Private Sub BtFermerOpe_Click(): ferme_un_point_cest_tout: End Sub
Private Sub BtFermerPlaque_Click(): ferme_un_point_cest_tout: End Sub
Private Sub BtFermerProduit_Click(): ferme_un_point_cest_tout: End Sub
Private Sub BtFermerTransporteur_Click(): ferme_un_point_cest_tout: End Sub
Private Sub btnFermer_Click(): ferme_un_point_cest_tout: End Sub
Private Sub BtFermerTransVente_Click(): ferme_un_point_cest_tout: End Sub
'*************************************************************************************************
'*************************************************************************************************
'forcer les textbox en numerique seulement
Function KeyAsciiX(keyascii)
'TRANSFORMER LE POINT PAR UNE VIRGULE
If keyascii = 46 Then keyascii = 44
If InStr("1234567890,-", Chr(keyascii)) = 0 Then keyascii = 0
With ActiveControl
If InStr(.Value, ",") Then keyascii = 0
If Chr(keyascii) = "-" And .Value <> "" Then keyascii = 0
End With
End Function
Private Sub TxtDiamTrouPlaque_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
Private Sub TxtCoeffApplique_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
Private Sub TxtPourcentage_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
Private Sub TxtPrixKgTransVente_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
Private Sub TxtPourcentageComm_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
Private Sub TxtPrixKgTrans_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
Private Sub TxtPrixEmballage_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
Private Sub TxtPrixEtiquette_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
Private Sub TxtPrixPlaque_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
Private Sub TxtPrixPot_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
Private Sub TxtCoeffTransBox_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
Private Sub TxtPrixVente_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
Private Sub TxtPrixAccess_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
Private Sub TxtPvLM_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
Private Sub TxtPvAPEX_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
Private Sub TxtPvGAMMVERT_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
Private Sub TxtPvAUCHAN_KeyPress(ByVal keyascii As MSForms.ReturnInteger): KeyAsciiX keyascii: End Sub
'*************************************************************************************************
'*******************************************************************************
'sub generique pour alimenter les listbox et combobox pouvant etre appellée a tout moment
Sub Alimenter_List(ctrl, tablo)
ctrl.ColumnCount = UBound(tablo)
ctrl.List = tablo
End Sub
'*************************************************************************************************