Border Around ACTIVE Cell

Mister H

Well-known Member
Joined
Mar 6, 2002
Messages
1,507
Hi:

Does anyone know how to change the border (color or appearance) around the ACTIVE Cell. I have a spreadsheet that I created that has a lot of borders on it and whenever you tab to the cell your really need to look closely at the screen to see which cell is active. If I could change the borders around the active cell to a different clor that would be great. If you can't do this does anyone have a suggestion?

Thanks,
Mark
 
Or better still, this so you can select an entire range:

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Target.FormatConditions.Delete
Target.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
Target.FormatConditions(1).Interior.ColorIndex = Int((56 - 1 + 1) * Rnd + 1)
End Sub

The word, is "groovy"
 
Upvote 0

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
**** you AudioJoe, now I can't stop!

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim iColor As Integer

iColor = Target.Interior.ColorIndex
If iColor < 0 Then
iColor = 1
Else
iColor = iColor + 1
End If


Cells.FormatConditions.Delete
Target.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
Target.FormatConditions(1).Interior.ColorIndex = iColor
End Sub


Stick with us Mister H, we'll have the selected cell sing the national anthem soon :eek:)
 
Upvote 0
Dave & AudioJoe
Thanks for this guys, a screen full of groovy colours has certainly cheered me up after finding out my great solution was a flop.
Back to the drawing board!
Best wishes
Derek
 
Upvote 0
OK, now my screen is starting to look like a 70's Saturday morning cartoon, and that's no bad thing let me tell you
 
Upvote 0
Derek, believe me when I say your original idea was brilliant, all great ideas have 'teething problems'. I have seen (so called Excel MVP's) write line after line, loop after loop to do something that Excel can already do. Simplicity is the edge in this game! Do you have a site? I am more than willing to promote it.

AudioJoe,
My Excel Workbook just locked up with the message:

"You have just performed a stupid operation, get a life!" :eek:)



_________________
Kind Regards
Dave Hawley
OzGrid Business Applications
Microsoft Excel/VBA Training
OzGrid.BusApp.170x45.gif

This message was edited by Dave Hawley on 2002-03-13 02:32
 
Upvote 0
Really!!? How??

If it came from this end then it must have been my collaborator, Jamie's, input... In fact, I can see him sniggering away. Just say the word DH and I'll pound the pooyanka's out of him...
 
Upvote 0
He says he's sorry, he's run out of pocket money after buying his regular copies of 'Big Ones' and '50 Plus' but otherwise he would have given you his lunch money as compensation.

Still Dave, at least you can have satisfaction of knowing that he will be sat in his house on his own tonight, knowing that when he reads his magazine about the voluptuous lady, and his other one about women that look like his grandma, that half the internet know about it

Giddup!
 
Upvote 0
Dave
(sorry for delay...had to go home for dinner!)
Your words of encouragement are very much appreciated. I do not have my own site Dave but that is an interesting idea.
The Excel environment is a great place for innovation and experimentation and along the way I have got used to trying really unorthodox methods of getting things done because I didn't know the "proper" way. So occasionally if I have had a success I throw in my twopenny worth.
But,truth to tell,(and as encouragement to all the beginners out there), my Excel knowledge has been gleaned entirely through trial and error and tips generously offered by other people. So, dear friends, I am actually on this site trying to learn the secrets from the likes of yourself and Audiojoe. I know some of the solutions posted must have taken hours to work out and I am always inspired by the way so many people freely give away their hard gained knowledge.
I tip my hat to all of you
Kind regards
Derek
 
Upvote 0
I too am but a beginner when it comes to VBA, and although I can do most things, it seems I always get stuck on the really simplistic things, and that's why I'm always here, lurking in the background.

So cheers all you guys for the help you've given me. It hasn't helped me bed more women, it hasn't helped me make more money, it hasn't..... hang on, what the f*** HAVE you done for me lately??? Just kidding, you've shown me loads of cool stuff

If any of you lived by me, I'd buy you some beers, but I guess seeing as you don't, you'll just have to buy them yourself and think of me. If anything it'll show you the value of your hard earned cash.

Altogether now, group hug

Joe :cool:
 
Upvote 0

Forum statistics

Threads
1,215,076
Messages
6,122,984
Members
449,092
Latest member
Mr Hughes

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