Alguém saber onde está o erro aqui??
Se eu tirar o "Set" ele funciona, mas precisaria desse método, pq usarei ele como uma condicional, depois
Sub Excluir()
Dim Mydin As Worksheets
Set Mydin = Application.Worksheets("Plan1")
If MsgBox(("Tem certeza que pretende limpar as informações das Tabelas Dinâmicas?"), vbYesNo + vbInterrogation, "Confirmação") = vbYes Then
With Sheets(Mydin)
Range("A1:Z100").Select
Selection.ClearContents
ActiveCell.Offset(1, -ActiveCell.Column + 2).Select
End With
End If
End Sub
Obrigado
Obrigado, Everton