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
| Option Explicit
Sub determination_filetage()
Application.Workbooks("Filetages").Worksheets("Filetage").Activate
Dim diam_male As Double
Dim diam_femelle As Double
Dim filet_par_pouce As Double
Dim pas As Double
diam_male = Cells(5, 2).Value
diam_femelle = Cells(4, 2).Value
filet_par_pouce = Cells(4, 5).Value
pas = Cells(5, 5).Value
MsgBox "Recherche de la combinaison diamètre mâle " & diam_male & "/" & diam_femelle & " femelle et filetage filet par pouce " & filet_par_pouce & "/" & pas & " pas"
Dim ligne_male As Range
Dim ligne_femelle As Range
Dim num_ligne_male As Integer
Dim num_ligne_femelle As Integer
Dim colonne_filet As Range
Dim colonne_pas As Range
Dim num_colonne_filet As Integer
Dim num_colonne_pas As Integer
With Worksheets("Détermination filetage")
Set ligne_male = Range("A5:A319").Find("diam_male")
If ligne_male Is Nothing Then
MsgBox "Diamètre mâle non trouvé"
Else
num_ligne_male = Rows("ligne_male")
MsgBox num_ligne_male
End If
End With
MsgBox "Fin de macro"
End Sub |
Partager