vitor_salgado
04-03-2018 22:06:56
Boa Tarde,
Estou tentando criar um botão de desfazer, que simplesmente apagar a ultima linha preenchida pelo formulário escrito abaixo. Como o ctrl+z não funciona nas macros pensei em escrever algo que vá para ultima linha preenchida e selecione as 3 abas da ultima linha e delete elas.
Alguém pode me ajudar?
Private Sub txtcontrato_DropButtonClick()
txtcontrato.List = Array("NOVO", "RENOVADO")
End Sub
Private Sub txtimovel_DropButtonClick()
txtimovel.List = Array("APARTAMENTO", "BARRACÃO", "CASA")
End Sub
Private Sub botaoinserir_Click()
Linha = Sheets("Março").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Row
Planilha3.Cells(Linha, 1).Value = Me.txtimovel
Planilha3.Cells(Linha, 2).Value = Me.txtcontrato
Planilha3.Cells(Linha, 3).Value = CCur(Me.txtvalor)
Me.txtvalor.Value = Null
End Sub
Private Sub botaodesfazer_Click()
End Sub
Estou tentando criar um botão de desfazer, que simplesmente apagar a ultima linha preenchida pelo formulário escrito abaixo. Como o ctrl+z não funciona nas macros pensei em escrever algo que vá para ultima linha preenchida e selecione as 3 abas da ultima linha e delete elas.
Alguém pode me ajudar?
Private Sub txtcontrato_DropButtonClick()
txtcontrato.List = Array("NOVO", "RENOVADO")
End Sub
Private Sub txtimovel_DropButtonClick()
txtimovel.List = Array("APARTAMENTO", "BARRACÃO", "CASA")
End Sub
Private Sub botaoinserir_Click()
Linha = Sheets("Março").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Row
Planilha3.Cells(Linha, 1).Value = Me.txtimovel
Planilha3.Cells(Linha, 2).Value = Me.txtcontrato
Planilha3.Cells(Linha, 3).Value = CCur(Me.txtvalor)
Me.txtvalor.Value = Null
End Sub
Private Sub botaodesfazer_Click()
End Sub