Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 10-23-2013, 09:11 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline highlight the entire row of current cell Windows 7 64bit highlight the entire row of current cell Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,948
Pecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond repute
Default

It's not very complicated to add the VBA solution

Open a workbook
Hit Alt+F11 ( VB editor opens)
Clcik View - Project explorer ( it's usually open by default)
Select the sheet where you want to implement the macro
A window opens

Paste this code

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Cells.Count > 1 Then Exit Sub

    Application.ScreenUpdating = False
    ' Clear the color of all the cells
    Target.Parent.Cells.Interior.ColorIndex = 0
    With Target
        ' Highlight the entire row and column that contain the active cell
        .EntireRow.Interior.ColorIndex = 8
        
    End With
    Application.ScreenUpdating = True
End Sub
Close the VB window and save when asked
From now on the row will highlight when a cell is selected

Play around with the macro a bit to change the color there where it says
.EntireRow.Interior.ColorIndex = 8
Change the 8 to another value

It works for me and I know nothing about VB
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
highlight the entire row of current cell Excel 2007, highlight entire row based on data found in one cell MSofficeBLUE Excel 2 10-15-2013 09:51 PM
Is there a way to automatically highlight the column and the row that of the current Jamal NUMAN Excel 8 02-14-2012 02:58 PM
highlight the entire row of current cell How to highlight the row based on cell value? Learner7 Excel 1 12-11-2011 02:28 AM
highlight the entire row of current cell Macro for moving one cell down from current position Johnny thunder Word VBA 3 04-07-2011 04:44 PM
highlight cell after checkbox flatk Word 0 01-25-2007 12:32 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:47 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft