1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
| Sub recherche()
'rechercher dans la feuil catalogue, le contenu de la feuil gestion rangé I10
Application.ScreenUpdating = False
Sheets("Catalogue").Select
Dim Cellule As Range
Set Cellule = Range("A:A").Find(what:=Sheets("Gestionnaire du magasin").Range("I10").Value, LookIn:=xlValues, lookat:=xlWhole)
If Not Cellule Is Nothing Then Cells(Cellule.Row, Cellule.Column).Select
ActiveCell.Select
ActiveCell = UserForm2.TextBox11.Value
' on ajoute a la commande ''Bt ajout''
ActiveCell.Offset(0, 2) = ActiveCell.Offset(0, 2) + UserForm2.TextBox2.Value
'''''''''''''''''''''''''''On additionne chaque sortie de stock-sortie_magasin ''''''''''''''''
ActiveCell.Offset(0, 4) = ActiveCell.Offset(0, 4) + Val(UserForm2.TextBox4.Value)
Sheets("gestionnaire du magasin").Select
Application.ScreenUpdating = True
MsgBox "Modification Effectuer!"
Unload UserForm2
End Sub
-------------------------------
Sub Macro30()
'
' Macro30 Macro
'
'
ActiveWorkbook.Worksheets("Catalogue").ListObjects("Tableau5").Sort.SortFields. _
Clear
ActiveWorkbook.Worksheets("Catalogue").ListObjects("Tableau5").Sort.SortFields. _
Add2 Key:=Range("Tableau5[[#All],[Article]]"), SortOn:=xlSortOnValues, _
Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Catalogue").ListObjects("Tableau5").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub |
Partager