Results 1 to 1 of 1

Thread: Delete excel rows in vb.net?

  1. #1

    Thread Starter
    Banned
    Join Date
    Oct 2015
    Location
    Earth
    Posts
    175

    Delete excel rows in vb.net?

    Hi beautiful people,
    Following code deletes rows including Apple in the A column in VB6.
    Code:
    Sub Macro1()
    ActiveSheet.AutoFilterMode = False
    ActiveSheet.Cells.AutoFilter Field:=1, Criteria1:="=Apple"
    Application.DisplayAlerts = False
    On Error Resume Next
    ActiveSheet.AutoFilter.Range.Offset(1, 0).Resize(ActiveSheet.AutoFilter.Range.Rows.Count - 1).SpecialCells(xlCellTypeVisible).Delete
    On Error GoTo 0
    ActiveSheet.AutoFilterMode = False
    Application.DisplayAlerts = True
    End Sub
    I want same thing but in the vb.net.
    Any support will be appreciated...
    Last edited by Herry Markowitz; Oct 13th, 2015 at 12:47 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width