Este fórum está sendo desativado

Depois de 9 anos, este fórum será desativado. Mas calma.... estamos migrando para uma comunidade no DISCORD. Junte-se a nós.

ENTRAR PARA DISCORD

Tópicos relacionados a códigos VBA, gravação de macros, etc.
  • Avatar do usuário
#16741
textbox1 com a seguinte informação: Data inicial (20/08/2010)
e na textbox2 já aparece-se a resposta conforma abaixo
Gostaria que a resposta aparece-se nesse formato: 6 ano e 2 mês
Sem estar na plataforma VBA a formula seria essa:
DATADIF(Data_inicial;Data_final;"y")&" ano e "&DATADIF(Data_inicial;Data_final);"ym")& " mês" :D
Estou usando:
If IsDate(textbox1) Then
textbox2 = DateDiff("yyyy", textbox1, Date) & " anos e " & DateDiff("m", textboxi, Date) & " mês"
End If

Porem a resposta aparece como 6 anos e 74 mês :shock:

Estou começando a mexer com VBA e confesso que estou fascinado, porem até chegar lá precisarei de tempo e muito estudo, desde já agradeço.

Atenciosamente,
Gilson
Editado pela última vez por Gilsonbaco em 24 Out 2016 às 09:57, em um total de 1 vez.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]

Estamos migrando para uma comunidade no Discord