Hide selected cell's highlight/border

twl2009

Board Regular
Joined
Jan 7, 2016
Messages
247
I've seen this question asked a lot on the web, but no-one appears to have given the answer I'm looking for. Which leads me to think that it is not possible...that said..

I would like to hide the highlight border that excel puts round a cell when it is selected. On my excel it is a thick green border.

The first worksheet in my workbook contains only hyperlinks and buttons so it looks amateurish when the highlight is bouncing around.

Thanks

Twl
 
It is not possible to stop that action. This is letting you know what cell your in. Normally it's a small black line around the cell not a:
Your quote:
On my excel it is a thick green border.
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Maybe you could explain why seeing this box around the active cell is such a problem. I have been working with Excel for 30 years and have never seen a user disturbed about seeing the active cell with a border around it and its not actually what we would call a border.
 
Upvote 0
Well its primarily because the sheet Im working in only contains hyperlinks and buttons for the user to use, so when the 'border' or 'highlight' flies around it looks a bit messy. that was all. I was hoping for a nice easy solution. I imagine experienced excel people would have gone about the whole workbook differently from the start.
 
Upvote 0
So tell me what these buttons do. Do these buttons have scripts in them? If so show me one of your scripts. I think I may know what your talking about now and that be can be fixed.
Well its primarily because the sheet Im working in only contains hyperlinks and buttons for the user to use, so when the 'border' or 'highlight' flies around it looks a bit messy. that was all. I was hoping for a nice easy solution. I imagine experienced excel people would have gone about the whole workbook differently from the start.
 
Upvote 0
<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff; min-height: 13.0px}p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; background-color: #ffffff; min-height: 13.0px}p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #011993; background-color: #ffffff}span.s1 {color: #011993}span.s2 {color: #000000}</style>In worksheet


'Private Sub Worksheet_SelectionChange(ByVal Target As Range)

'If Target.Cells.Count > 1 Then Exit Sub


'If Not Intersect(Target, Range("R2")) Is Nothing Then Call Button1


'If Not Intersect(Target, Range("T2")) Is Nothing Then Call Button2


'End Sub


And then in a module


<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; background-color: #ffffff; min-height: 13.0px}p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff; min-height: 13.0px}p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #011993; background-color: #ffffff}span.s1 {color: #011993}span.s2 {color: #000000}</style>
'Sub Button1()


'Worksheets("Monthly").Unprotect

'If Range("B2") > DateSerial(2016, 12, 31) Then
'Range("B2").Value = DateAdd("M", -1, Range("B2"))
'End If


'Worksheets("Monthly").Protect


'ActiveSheet.Range("X2").Select




'End Sub






'Sub Button2()


'Worksheets("Monthly").Unprotect

'Range("B2").Value = DateAdd("M", 1, Range("B2"))

'Worksheets("Monthly").Protect


'ActiveSheet.Range("X2").Select




'End Sub
 
Upvote 0
Any time you write a script put this line of code near the top.
It stops you from seeing what's happening till the end of the script

Code:
Application.ScreenUpdating = False


and put this line of code near the end of the script:

Code:
Application.ScreenUpdating = True
 
Upvote 0
Tried that, it doesnt seem to have any effect, I even tried it here

<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff}p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; background-color: #ffffff; min-height: 13.0px}p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff; min-height: 13.0px}p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #011993; background-color: #ffffff}span.s1 {color: #011993}span.s2 {color: #000000}</style>Private Sub WorkBook_Open()


Application.ScreenUpdating = False


Worksheets("Monthly").Activate

Worksheets("Monthly").Unprotect
Worksheets("Monthly").Range("B2").Value = Format(Now(), "MMMM YYYY")
Worksheets("Monthly").ScrollArea = "A1:W28"
Worksheets("Monthly").Protect

Application.ScreenUpdating = True

End Sub


Because the opening of the workbook is really messy as it jumps from the last save back to the correct sheet.

But again no change.
 
Upvote 0
I know this a really old thread, but I had the same issue with presenting data to a client.

This can be done by Protecting the worksheet.

Firstly, I did not want the client to be able to change anything, however, clicking on radio-buttons and normal buttons obviously had to make changes to the cells that they are linked to. So I did this: Select all (Ctrl+A) cells in sheet. Right-click -> Format Cells. Protection Tab: Untick "Locked". So now all cells in the sheet is unlocked and can be changed by the programming / user selections.

Once you have done this for all relevant sheets, you may also want to turn off gridlines and headings under the View menu - this is just to make it look nice.

Now, for each sheet, under the Review Tab, Select "Protect Sheet". Untick ALL boxes. You could also choose to enter a password, if need be. When you click OK, the unsightly green selection box disappears.

To make it look even better, I also turn off the sheet tabs view in File -> Options -> Advanced: Display Options for this Workbook (remove tick from "Show sheet tabs").

Note: Chart updating seems to be an issue with this method, even when they are unlocked - I also have formulas that determine my maximum and minimum Y values, but this does not update when the sheet is locked. For that, I wrote my VBA to unprotect, update and re-protect the sheet, under the umbrella of the ScreenUpdating as above.

Hope this works for you.
Cheers
Chris
 
Upvote 0

Forum statistics

Threads
1,213,497
Messages
6,113,998
Members
448,541
Latest member
iparraguirre89

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
Back
Top