Jump to content

Recommended Posts

Posted

Amigos estou desenvolvendo uma rotina em VBA para uma planilha Excel e cheguei a um problemas em relação a somar horas, quando a variável totalHoras recebe valores como no exemplo totalHoras = 24:00 + 2:00 a variável imprime na célula ( 01/01/1900  02:00:00 )  gostaria de saber como solucionar este problema

Já tentei formatar a célula com NumberFormat e não dá certo:

            totHora = totHora + calcHora
            wrLinha.Cells(lin, col + 2).NumberFormat = "hh:mm"
            wrLinha.Cells(lin, col + 2).Value = calcHora

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.