Code optimisation
Replace the autobus function with the below. I dont understand why you are
passing the argument region if you are assigning some value within this
function...
Function autobus(billet, region)
region = Sheets("Frais dépl").Range("k8")
If billet = True Then
For intTemp = 21 To 29
If region = Sheets("Frais").Range("B" & intTemp) Then
autobus = Sheets("Frais").Range("E" & intTemp)
Exit For
End If
Next
End If
End Function
If this post helps click Yes
---------------
Jacob Skaria
|