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 Valentino
#40097
Boa noite.

Estou usando este código para realizar alterações na planilha usando textbox, mas quando tento alterar a data não funciona.
Quanto o restante consigo alterar normalmente.

segue o código que uso

Private Sub CmdPlan1_Click()

Lin = Sheets("PLAN1").Cells(Cells.Rows.Count, 1).End(xlUp).Row
If Lin < 2 Then Lin = 2

Application.ScreenUpdating = False
Sheets("PLAN1").Activate

For i = 2 To Lin
If Range("A" & i).Value = CDate(TxtData.Text) Then
Cells(i, 1).Value = CDate(TxtData.Text)
Cells(i, 2).Value = Format(TxtValor.Text, "R$ 0.00#,##")
Cells(i, 3).Value = TxtDescrição.Text
Cells(i, 4).Value = TxtObservação.Text
Exit For
End If
Next

TxtData.Text = ""
TxtValor.Text = ""
TxtDescrição.Text = ""
TxtObservação.Text = ""

Application.ScreenUpdating = True

End Sub
Avatar do usuário
Por Jimmy
Avatar
#40105
Olá Valentino,

Pra ver o que está acontecendo, quem quem quiser te ajudar vai necessitar a planilha com a Form,campos, etc.

Ajude a gente anexando a planilha.

Obrigado,

Jimmy San Juan
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