Last active
October 19, 2020 03:00
-
-
Save imamuddinwp/fd22631a577d40ec24cf5120f77e0ffd to your computer and use it in GitHub Desktop.
This is a gist on about Delete Filtered Data : Excel Macro, Excel VBA; powered by Imam Uddin; imamuddinwp.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Delete_Fitered_Rows() | |
' | |
' Macro1 Macro | |
' | |
' | |
Dim yn_Cond As Integer | |
yn_Cond = MsgBox("Are you Confirm to DELETE VISIBLE ROWS??/" & vbNewLine & "-------------------------" & vbNewLine & " You may lost your data !!!", vbYesNo + vbQuestion, "proudLy powered by ImAmUdDiN ") | |
If yn_Cond = vbYes Then | |
ActiveSheet.AutoFilter.Range.Offset(1, 0).Rows.SpecialCells(xlCellTypeVisible).Delete (xlShiftUp) | |
End If | |
End Sub | |
'Without Message or Warnings ⚠ | |
Sub Delete_Fitered_Rows1() | |
ActiveSheet.AutoFilter.Range.Offset(1, 0).Rows.SpecialCells(xlCellTypeVisible).Delete (xlShiftUp) | |
ActiveSheet.ShowAllData | |
ActiveWorkbook.Save | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment