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
#58615
Boa Tarde,
Na Planilha Anexo, Necessito de Um Código (a Ser Vinculado ao Botão “Deletar Dados Anual”) de tal forma que ao clicar no respectivo botão, Sejam Excluídos todos os dados a PARTIR da célula “A8” (idem para células: “B8”, “C8”, “D8” , “E8” , “F8”, “G8”), até onde houver o último registro na coluna “H” (no exemplo anexo são 154, porém podem ter mais dados) também respeitando o limite inicial a PARTIR de “H8”.
IMPORTANTE: Antes de executar a rotina de exclusão de dados, deve-se fazer a pergunta de confirmação: "Deseja realmente Excluir os Dados?"
Desde já Agradeço
Você não está autorizado a ver ou baixar esse anexo.
#58616
Código: Selecionar todos
Sub Deletar()
Dim x As Integer
    Range("A8:G" & Planilha1.Cells(Rows.Count, 8).End(xlUp).Row).Select
x = MsgBox("VOCÊ QUER MESMO DELETAR?", vbYesNo + vbQuestion, Title:="© Muca Sistemas - 2020")
If x = vbYes Then
    Range("A8:G" & Planilha1.Cells(Rows.Count, 8).End(xlUp).Row).ClearContents
Else
Exit Sub
End If
End Sub
#58619
Prezado mucascosta 09 Set 2020 às 15:52
Obrigado Por Contribuir Com a Solução!
Então...
Não Funcionou, Deu o Seguinte Bug: 'Erro em tempo de execução '424'- Objeto é Obrigatório.
Se For Possível Peço Avaliar
Grato
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