Consulting

Results 1 to 2 of 2

Thread: test colour highlight code

  1. #1
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,306
    Location

    test colour highlight code

    [COLOR=#333333]Private Sub CommandButton21_Click()[/COLOR] 
    [COLOR=#333333]With Worksheets("Report").Activate[/COLOR] 
    [COLOR=#333333]With Range("A1" & Range("AS" & Rows.Count).End(xlUp))[/COLOR] 
    [COLOR=#FF0000][B].AutoFilter Field:=45, Criteria1:="2 - WAY"[/B][/COLOR] 
    [COLOR=#333333]On Error Resume Next[/COLOR] 
    [COLOR=#333333].Offset(1).SpecialCells(12).EntireRow.Delete[/COLOR] 
    [COLOR=#333333]End With[/COLOR] 
    [COLOR=#333333].AutoFilterMode = False[/COLOR] 
    [COLOR=#333333]End With[/COLOR] 
    [COLOR=#333333]End Sub[/COLOR] 
    
    
    Formatting tags added by mark007
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  2. #2

Posting Permissions

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