![]() |
Code for testing whether a cell or row is highlighted?
I need something that is to the purpose of:
if the cell is highlighted, copy the row and paste it here. What is the code for testing whether a cell or row is highlighted? Thanks. |
Code for testing whether a cell or row is highlighted?
What do you mean by "highlighted". HTH Otto
"J@Y" wrote in message ... I need something that is to the purpose of: if the cell is highlighted, copy the row and paste it here. What is the code for testing whether a cell or row is highlighted? Thanks. |
Code for testing whether a cell or row is highlighted?
Sub colortest()
If ActiveCell.Interior.ColorIndex = xlNone Then MsgBox ("not colored") Else MsgBox ("colored") End If End Sub -- Gary''s Student - gsnu200725 |
Code for testing whether a cell or row is highlighted?
Great simple solution. Thanks.
"Gary''s Student" wrote: Sub colortest() If ActiveCell.Interior.ColorIndex = xlNone Then MsgBox ("not colored") Else MsgBox ("colored") End If End Sub -- Gary''s Student - gsnu200725 |
Code for testing whether a cell or row is highlighted?
You are welcome
Simple is always good. -- Gary''s Student - gsnu200725 "J@Y" wrote: Great simple solution. Thanks. "Gary''s Student" wrote: Sub colortest() If ActiveCell.Interior.ColorIndex = xlNone Then MsgBox ("not colored") Else MsgBox ("colored") End If End Sub -- Gary''s Student - gsnu200725 |
All times are GMT +1. The time now is 06:23 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com