+ Reply to Thread
Results 1 to 4 of 4

Need Help on highlighting entire row in VBA

  1. #1
    Registered User
    Join Date
    10-28-2013
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    17

    Need Help on highlighting entire row in VBA

    My current Code i am using works good for what I am doing now I would like to highlight the entire row with a Range of (r, 1) to r, 24)

    Sub comment_void()
    ' only additional comment, won't delete the row
    Dim r As Long, t As Integer
    Dim c As Integer
    c = colum(4)
    r = ActiveCell.Row
    t = ActiveCell.Column
    If Cells(r, 2) = "" Then
    Exit Sub
    End If
    Application.ScreenUpdating = False
    If c > 0 Then
    Cells(r, 21).Value = "Void File: " & Cells(r, c).Value
    Else
    Cells(r, 21).Value = "Void"
    End If
    Cells(r, 1).Value = "Noise Test"
    Cells(r, 2).Value = "Noise Test"
    Cells(r, 9).Value = ""
    Cells(r, 11).Value = ""
    Cells(r, 12).Value = ""
    Cells(r, 13).Value = ""
    Cells(r, 14).Value = ""
    Cells(r, 15).Value = ""
    Cells(r, 19).Value = ""
    Cells(r, 20).Value = ""
    Cells(r, 1).Font.Bold = True
    Cells(r, 2).Font.Bold = True
    Cells(r, 21).Font.Bold = True

    Cells(r, t).Select
    Application.ScreenUpdating = True

    End Sub

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Need Help on highlighting entire row in VBA

    Not sure if this helps or not:

    Please Login or Register  to view this content.
    BTW the forum rules require using code tags when posting. See Rule No. 3.

  3. #3
    Registered User
    Join Date
    10-28-2013
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    17

    Re: Need Help on highlighting entire row in VBA

    That worked, and thank you i will also look at Rule No. 3. thanks for the heads up

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Need Help on highlighting entire row in VBA

    You're welcome. Glad to help out and thanks for the feedback. You may also want to check out Forum Rule No. 9. as well.

    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel 2007 : Highlighting the entire spreadsheet
    By youngsequan in forum Excel General
    Replies: 4
    Last Post: 10-15-2009, 03:29 PM
  2. Highlighting entire row
    By MissLotus in forum Excel General
    Replies: 6
    Last Post: 05-17-2009, 10:54 PM
  3. highlighting entire functions
    By BorisS in forum Excel General
    Replies: 2
    Last Post: 06-21-2006, 09:35 PM
  4. [SOLVED] Highlighting entire row cursor on
    By John in forum Excel General
    Replies: 1
    Last Post: 01-22-2006, 04:45 PM
  5. Highlighting entire row
    By escelinen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-13-2005, 08:05 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1