![]() |
selected cells doesnot change colour
I want the excel cells to change colour as I select so I could see the range
I have selected as it was in previous versions. How I can select this option. |
selected cells doesnot change colour
This is worksheet code so right-click the sheet tab and paste in
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Static lastcell As Range Target.Interior.ColorIndex = 3 'modify to suit lastcell.Interior.ColorIndex = xlColorIndexNone Set lastcell = Target End Sub Mike "Zarrar Janjua" wrote: I want the excel cells to change colour as I select so I could see the range I have selected as it was in previous versions. How I can select this option. |
selected cells doesnot change colour
sorry forgot a line, try this one:-
Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Static lastcell As Range Target.Interior.ColorIndex = 3 'modify to suit lastcell.Interior.ColorIndex = xlColorIndexNone Set lastcell = Target End Sub Mike "Zarrar Janjua" wrote: I want the excel cells to change colour as I select so I could see the range I have selected as it was in previous versions. How I can select this option. |
selected cells doesnot change colour
Thanks Mike,
Do I need to remember this code Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Static lastcell As Range Target.Interior.ColorIndex = 3 'modify to suit lastcell.Interior.ColorIndex = xlColorIndexNone Set lastcell = Target End Sub to paste every time I open a workbook. Is there any permanent fix for this? "Mike H" wrote: sorry forgot a line, try this one:- Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Static lastcell As Range Target.Interior.ColorIndex = 3 'modify to suit lastcell.Interior.ColorIndex = xlColorIndexNone Set lastcell = Target End Sub Mike "Zarrar Janjua" wrote: I want the excel cells to change colour as I select so I could see the range I have selected as it was in previous versions. How I can select this option. |
selected cells doesnot change colour
just save the workbook before you close and it will keep the code
"Zarrar Janjua" wrote: Thanks Mike, Do I need to remember this code Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Static lastcell As Range Target.Interior.ColorIndex = 3 'modify to suit lastcell.Interior.ColorIndex = xlColorIndexNone Set lastcell = Target End Sub to paste every time I open a workbook. Is there any permanent fix for this? "Mike H" wrote: sorry forgot a line, try this one:- Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Static lastcell As Range Target.Interior.ColorIndex = 3 'modify to suit lastcell.Interior.ColorIndex = xlColorIndexNone Set lastcell = Target End Sub Mike "Zarrar Janjua" wrote: I want the excel cells to change colour as I select so I could see the range I have selected as it was in previous versions. How I can select this option. |
selected cells doesnot change colour
Mike!
After this code I am loosing colours if I click mouse in my colums which have different colour ranges. I need the options to be set permanently in the excel as it was before in my Office Xp edition. I think probably this is not included in this Office 2007 edition. "Mike H" wrote: just save the workbook before you close and it will keep the code "Zarrar Janjua" wrote: Thanks Mike, Do I need to remember this code Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Static lastcell As Range Target.Interior.ColorIndex = 3 'modify to suit lastcell.Interior.ColorIndex = xlColorIndexNone Set lastcell = Target End Sub to paste every time I open a workbook. Is there any permanent fix for this? "Mike H" wrote: sorry forgot a line, try this one:- Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Static lastcell As Range Target.Interior.ColorIndex = 3 'modify to suit lastcell.Interior.ColorIndex = xlColorIndexNone Set lastcell = Target End Sub Mike "Zarrar Janjua" wrote: I want the excel cells to change colour as I select so I could see the range I have selected as it was in previous versions. How I can select this option. |
selected cells doesnot change colour
You didn't tell me that when you asked your question. You need something far
more advance and I suggest you look at Rowliner which will leave the original colour in the cell http://www.cpearson.com/excel/RowLiner.htm Mike "Zarrar Janjua" wrote: Mike! After this code I am loosing colours if I click mouse in my colums which have different colour ranges. I need the options to be set permanently in the excel as it was before in my Office Xp edition. I think probably this is not included in this Office 2007 edition. "Mike H" wrote: just save the workbook before you close and it will keep the code "Zarrar Janjua" wrote: Thanks Mike, Do I need to remember this code Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Static lastcell As Range Target.Interior.ColorIndex = 3 'modify to suit lastcell.Interior.ColorIndex = xlColorIndexNone Set lastcell = Target End Sub to paste every time I open a workbook. Is there any permanent fix for this? "Mike H" wrote: sorry forgot a line, try this one:- Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Static lastcell As Range Target.Interior.ColorIndex = 3 'modify to suit lastcell.Interior.ColorIndex = xlColorIndexNone Set lastcell = Target End Sub Mike "Zarrar Janjua" wrote: I want the excel cells to change colour as I select so I could see the range I have selected as it was in previous versions. How I can select this option. |
selected cells doesnot change colour
Thanks Don, but it didn't worked.
When I select rows and columns in Excel, the selected cells are too feint to see clearly (much darker in previous releases). Is there a way of darkening the default selected cells shading? I'm not referring to Fill colours and patters - just the colour/shading used when cells are selected, and want this setting as default for all my workbooks and new Excel files. Thanks "Don Guillett" wrote: Right click sheet tabview codeinsert thisfor entire row, uncomment Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.FormatConditions.Delete With Target '.EntireRow .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" .FormatConditions(1).Interior.ColorIndex = 20 End With End Sub -- Don Guillett SalesAid Software "Zarrar Janjua" wrote in message ... Mike! After this code I am loosing colours if I click mouse in my colums which have different colour ranges. I need the options to be set permanently in the excel as it was before in my Office Xp edition. I think probably this is not included in this Office 2007 edition. "Mike H" wrote: just save the workbook before you close and it will keep the code "Zarrar Janjua" wrote: Thanks Mike, Do I need to remember this code Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Static lastcell As Range Target.Interior.ColorIndex = 3 'modify to suit lastcell.Interior.ColorIndex = xlColorIndexNone Set lastcell = Target End Sub to paste every time I open a workbook. Is there any permanent fix for this? "Mike H" wrote: sorry forgot a line, try this one:- Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Static lastcell As Range Target.Interior.ColorIndex = 3 'modify to suit lastcell.Interior.ColorIndex = xlColorIndexNone Set lastcell = Target End Sub Mike "Zarrar Janjua" wrote: I want the excel cells to change colour as I select so I could see the range I have selected as it was in previous versions. How I can select this option. |
selected cells doesnot change colour
To get what YOU want I think you will have to goto windowsappearance
-- Don Guillett SalesAid Software "Zarrar Janjua" wrote in message ... Thanks Don, but it didn't worked. When I select rows and columns in Excel, the selected cells are too feint to see clearly (much darker in previous releases). Is there a way of darkening the default selected cells shading? I'm not referring to Fill colours and patters - just the colour/shading used when cells are selected, and want this setting as default for all my workbooks and new Excel files. Thanks "Don Guillett" wrote: Right click sheet tabview codeinsert thisfor entire row, uncomment Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.FormatConditions.Delete With Target '.EntireRow .FormatConditions.Add Type:=xlExpression, Formula1:="TRUE" .FormatConditions(1).Interior.ColorIndex = 20 End With End Sub -- Don Guillett SalesAid Software "Zarrar Janjua" wrote in message ... Mike! After this code I am loosing colours if I click mouse in my colums which have different colour ranges. I need the options to be set permanently in the excel as it was before in my Office Xp edition. I think probably this is not included in this Office 2007 edition. "Mike H" wrote: just save the workbook before you close and it will keep the code "Zarrar Janjua" wrote: Thanks Mike, Do I need to remember this code Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Static lastcell As Range Target.Interior.ColorIndex = 3 'modify to suit lastcell.Interior.ColorIndex = xlColorIndexNone Set lastcell = Target End Sub to paste every time I open a workbook. Is there any permanent fix for this? "Mike H" wrote: sorry forgot a line, try this one:- Private Sub Worksheet_SelectionChange(ByVal Target As Range) On Error Resume Next Static lastcell As Range Target.Interior.ColorIndex = 3 'modify to suit lastcell.Interior.ColorIndex = xlColorIndexNone Set lastcell = Target End Sub Mike "Zarrar Janjua" wrote: I want the excel cells to change colour as I select so I could see the range I have selected as it was in previous versions. How I can select this option. |
All times are GMT +1. The time now is 12:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com