FUNÇÃO PERSONALIZADA RETORNA DIFERENÇA DE DIAS ENTRE DUAS DATAS,
-ANOS, MESES E DIAS.

' - - - - - - -  - - - - - --  -- - - - - - - - - - - - - -
Function Decorrido
(DataInicial As Date, DataFinal As Date, TipoRetorno As Integer)
    Dim AnoInicial As Integer
    Dim AnoFinal As Integer
    Dim MesInicial As Integer
    Dim MesFinal As Integer
    Dim DiaInicial As Integer
    Dim DiaFinal As Integer
   
    AnoInicial = Year(DataInicial)
    MesInicial = Month(DataInicial)
...
Quer ler esse conteúdo completo? Tenha acesso completo