Skip to content

Instantly share code, notes, and snippets.

@imamuddinwp
Last active October 19, 2020 03:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imamuddinwp/fd22631a577d40ec24cf5120f77e0ffd to your computer and use it in GitHub Desktop.
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.
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