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.
#68596
Bom dia pessoal!!
Estou fazendo um forms no VBA para cadastramento e controle de multas, porém quando eu insiro as informações no forms, ele substituí a segunda linha de informações, não consigo novas informações pois ele sempre fica substituindo.
Segue abaixo o código que estou usando:


Private Sub CommandButton1_Click()

linha = Cells(Rows.Count, 1).End(xlUp).Row + 1
Cells(linha, 1) = caixa_placa.Value

If botao_dpo.Value = True Then
Cells(linha, 3) = "DPO"
Else
Cells(linha, 3) = "SPO"
End If

Cells(linha, 2) = Caixacombinacao_status
Cells(linha, 4) = caixa_data.Value
Cells(linha, 5) = caixa_autuacao.Value
Cells(linha, 6) = caixa_autuacaoiden.Value
Cells(linha, 7) = caixa_data_recebimento.Value
Cells(linha, 8) = caixa_operacao.Value
Cells(linha, 9) = caixa_motorista.Value
Cells(linha, 10) = caixa_motivo.Value
Cells(linha, 11) = caixa_local.Value
Cells(linha, 12) = caixa_prazoiden.Value
Cells(linha, 13) = caixa_prazovenc.Value
Cells(linha, 14) = caixa_mdt.Value
Cells(linha, 15) = caixa_obs.Value

Cells(linha, 16) = caixa_valor.Value
Cells(linha, 17) = caixa_valorcobrar.Value

Cells(linha, 18) = caixa_art.Value
Cells(linha, 19) = caixa_pontos.Value


Unload Cadastro_Multas

End Sub
#68597
Substitua o número em vermelho.

de ~~~> linha = Cells(Rows.Count, 1).End(xlUp).Row + 1

para~~~> linha = Cells(Rows.Count, 3).End(xlUp).Row + 1
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