1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Public Function GetVal(ByVal search_colonne As String)
Dim chemin As String, valeur
With ActiveCell
chemin = "'\\DSFR451-FS0001\Common_A\Suivi\Suivi des heures\" & Cells(.Row, 2) & "\SUIVI HEURES " & Cells(.Row, 2) & "\" & _
Cells(.Row, 4) & "\[" & Cells(.Row, 2) & "-W" & Cells(.Row, 5) & ".xlsm]Semaine'!" & _
Range(search_colonne & Range(Cells(.Row, 6))).Address(, , xlR1C1)
If Dir("\\DSFR451-FS0001\Common_A\Suivi\Suivi des heures\" & Cells(.Row, 2) & "\SUIVI HEURES " & Cells(.Row, 2) & _
"\" & Cells(.Row, 4) & "\" & Cells(.Row, 2) & "-W" & Cells(.Row, 5) & ".xlsm") = "" Then
valeur = 0
Else
valeur = ExecuteExcel4Macro(chemin)
End If
End With
GetVal = valeur
End Function |
Partager