1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
public Function fHistoriser
Set oRgRiskMatrix = oShtVersion.Range("h3:k8") '-> plage 6x4
lLastRow = oShtGraphe.Range("a" & oShtGraphe.Range("a:a").Rows.Count).End(xlUp).Row
lLastCol = oShtGraphe.Cells(3, oShtGraphe.Columns.Count).End(xlToLeft).Column - 1
Set oRgSelect = oShtGraphe.Range(Cells(3, 2), Cells(3, lLastCol)): Debug.Print "oRgSelect.Address = " & oRgSelect.Address
oRgSelect.NumberFormat = "General"
dDate = Date
Set oRgFind = oRgSelect.Find(What:=CLng(dDate), LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByColumns)
If Not oRgFind Is Nothing Then
oRgSelect.NumberFormat = "m/d/yyyy"
Set oRgFind = oRgFind.Resize(lLastRow, 1):
If fSetValue(oRgFind, oRgRiskMatrix, dDate) = True Then GoTo End_
End If
End Function |