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
Por Fydellys
#2368
Olá,

Eu queria que alguém pudesse me ajudar interpretar este código pois não estou intendendo ele... por favor alguém poderia me ajudar e principalmente onde está em negrito.

Sub chamar()
If ProtegidoVBProject(ActiveWorkbook) Then

Else
sos
End If
Application.EnableEvents = False
Application.Visible = False
Dim cont, auxcont As Integer
Plan1.Range("c15485") = Date
If Plan1.Range("b15485") = nill Then
Plan5.Range("b15485") = Date

End If
cont = Format(Plan1.Range("c15485") - Plan1.Range("b15485"), "0")
auxcont = 9999 - cont
If cont >= 9999 Then
Application.Visible = False
UserForm.Show
Else
menu.Show
End If
End Sub


Att.
Avatar do usuário
Por laennder
Avatar
#2369
Código: Selecionar todos
Plan1.Range("c15485") = Date
A célula C15485 da Plan1 recebe o valor da data atual do sistema operacional.
Código: Selecionar todos
If Plan1.Range("b15485") = nill Then
Plan5.Range("b15485") = Date
End If
Se a célula B15485 da Plan1 estiver vazia, então ela recebe o valor da data atual também.
Código: Selecionar todos
cont = Format(Plan1.Range("c15485") - Plan1.Range("b15485"), "0")
Atribui a variável cont a diferença de dias entre as datas nas células C15485 e B15485, formatando para ser exibido no formato númerico.
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