Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
J@Y J@Y is offline
external usenet poster
 
Posts: 127
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,090
Default 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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.programming
J@Y J@Y is offline
external usenet poster
 
Posts: 127
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rename selected (highlighted) sheet with cell contents of sheets in cell A1 [email protected] Excel Programming 2 December 15th 06 08:41 AM
Checklist for testing code? M. Authement Excel Programming 2 April 25th 06 06:49 PM
unit testing code using vba Eric[_27_] Excel Programming 0 December 5th 05 03:51 AM
Testing code for oldest version... John Keith[_2_] Excel Programming 1 October 25th 05 03:16 PM
testing the state of a checkbox in vba code Paul James[_3_] Excel Programming 10 December 5th 03 07:55 PM


All times are GMT +1. The time now is 10:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"