Valeur renvoyer dans un tableau differe de la cellule

Bonjour

Sous l'onglet "Px du patient"

Lorsque je rentre un intervalle de date et une dose en DÉCIMAL en ml...... mon calcul s'effectue correctement. Mais lorsque je crée mon tableau la valeur de ma dose est arrondi alors qu'il faut qu'il m'affiche exactement la même chose de ce que j'ai rentrer dans mes valeurs. Comment faire pour rectifier la chose?

Merci

Bonjour,

une correction de ton code

Option Explicit

Public Sub Create_calendar()
Dim lo As ListObject, lo2 As ListObject
Dim rCell As Range, Cell As Range, rng As Range
Dim dt As Date, dt2 As Date
'-------------------------------------------------
Dim d As Double, n As Double
'-------------------------------------------------
    With ActiveSheet
        Set lo = .ListObjects("T_date")
        Set lo2 = .ListObjects("T_horaire")
    End With
    With lo2
        If Not .DataBodyRange Is Nothing Then .DataBodyRange.Delete
        Set rCell = .InsertRowRange.Cells(2)
    End With
    For Each Cell In lo.ListColumns(2).DataBodyRange
        dt = Cell.Value: dt2 = Cell.Offset(, 1)
        d = Cell.Offset(, 3)
        n = dt2 - dt + 1
        rCell.Value = dt
        Set rng = rCell.Resize(n)
        With rng
            .DataSeries Type:=3, Date:=1, stop:=dt2
            .Offset(, 1).Value = d
        End With
        Set rCell = lo2.HeaderRowRange.Cells(2).Offset(lo2.ListRows.Count + 1)
    Next Cell
    With lo2
        .Sort.SortFields.Add .ListColumns(2).DataBodyRange, xlSortOnValues, xlAscending
        .Sort.Apply
        .Sort.SortFields.Clear
    End With
End Sub

merci !! sa fonctionne !

Rechercher des sujets similaires à "valeur renvoyer tableau differe"