Unless it runs faster I would keep it simple Y On Feb 4, 5:58 am, Mehdi_21 <meh.i...@gmail.com> wrote: > thanks a lot ;) > > i tried another code also, here's it : > > Dim rng As Range > what = "FF*" > Do > Set rng = ActiveSheet.UsedRange.Find(what) > If rng Is Nothing Then > Exit Do > Else > Rows(rng.Row).Delete > End If > Loop > > On Feb 2, 10:26 pm, yorkeyite <yorkeyi...@gmail.com> wrote: > > > Try > > > Dim c As Range > > For Each c In Range("A1:H1000") > > If c Like "FF*" Then > > c.EntireRow.Delete > > End If > > Next c > > > Yorkeyite > > > On Feb 2, 5:55 am, Mehdi_21 <meh.i...@gmail.com> wrote: > > > > hey guys, how r u all? > > > > i started a macro that imports a text file to a worksheet, it all > > > worked but when it comes to the part where the program must suppress > > > specific cells it doesn't work , here's the code, plz do help ;) > > > > Private Sub parcourir_Click() > > > > Dim vFile As Variant > > > > 'Showing Excel Open Dialog Form > > > vFile = Application.GetOpenFilename("Text Files (*.txt)," & _ > > > "*.txt", 1, "Select Text File", "Open", False) > > > > 'If Cancel then exit > > > If TypeName(vFile) = "Boolean" Then > > > Exit Sub > > > End If > > > > 'Open selected file > > > Workbooks.OpenText vFile, Origin:=xlMSDOS, StartRow:=1, > > > DataType:=xlDelimited, TextQualifier:= _ > > > xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, > > > Semicolon:=False, _ > > > Comma:=True, Space:=False, Other:=False, FieldInfo:=Array(Array > > > (1, 1), _ > > > Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, > > > 1), Array(7, 1), Array(8, 1), _ > > > Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array > > > (13, 1), Array(14, 1), Array(15 _ > > > , 1)), TrailingMinusNumbers:=True > > > > ' here's where the program doesn't seem to work > > > > For Each c In [A1:H1000] > > > If c.Value Like "FF*" Then > > > c.Select > > > c.Delete > > > ActiveCell.EntireRow.Delete > > > > End If > > > Next > > > > Unload Me > > > End Sub > > > > thanks ;)
--~--~---------~--~----~------------~-------~--~----~ Visit the blog to download Excel tutorials at http://www.excel-macros.blogspot.com To post to this group, send email to excel-macros@googlegroups.com For more options, visit this group at http://groups.google.com/group/excel-macros?hl=en Visit & Join Our Orkut Community at http://www.orkut.com/Community.aspx?cmm=22913620 To Learn VBA Macros Please visit http://www.vbamacros.blogspot.com To see the Daily Excel Tips, Go to: http://exceldailytip.blogspot.com If you find any spam message in the group, please send an email to Ayush @ jainayus...@gmail.com -~----------~----~----~----~------~----~------~--~---