VBA to Highligt row of Active Cell

MarkCBB

Active Member
Joined
Apr 12, 2010
Messages
497
Hi there VBA Pros,

I am need to some code to highligh (or BOLD, Incease size) of the active cell that is selected. I.e. when a user is busy looking at the database and they select cell G7, the whole row 7 is highlighted, making it easier for the user to see what data is related?

Can this be done? or is there a better way to do this.

I was thinking this code from Mr Excel (Bill), could be changed so that the image is a Box and it automatically fits under the row of the active cell?

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Shapes("Diagram 1").Left = _
ActiveWindow.VisibleRange.Cells(2, 3).Left
ActiveSheet.Shapes("Diagram 1").Top = _
ActiveWindow.VisibleRange.Cells(2, 3).Top
End Sub
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Hi. Try this: select the whole sheet, apply this Conditional Formatting formula and apply a fill colour

=ROW()=CELL("row")

then in the sheet's code module

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = True
End Sub
 

MarkCBB

Active Member
Joined
Apr 12, 2010
Messages
497
HI VoG,

That works Great, however it does slow things down a bit, is it possibel to endit this so if you click a cell on the same row, the Change trigger doesnt kick off. Only when you change Rows, does the trigger run? Otherwise this is brilliant, its for a friend that has really bad eye sight, so they are already happy that thaey can see what row they are on.

Thanks
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Maybe restrict the range of the CF to just the range they will be working with rather than the entire sheet. I've got it running with that range set to A1:Z100 and there is no noticeable lag.
 

MarkCBB

Active Member
Joined
Apr 12, 2010
Messages
497
It might be my Laptop then I set the CF to A2:L100000, however I added a check box to trun off and on if they dont want it any more, thanks VoG. this is great, and pretty simple, thanks for your help.

PS: I have a good VBA question coming up soon. will Title VBA change Paste range on full month, think it might be a bit tougher.

Thasnk again for all your help.

Kindest regards,
Mark Blackburn
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,699
Messages
5,833,206
Members
430,196
Latest member
rez5656

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top