Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cut paste will not work

Status
Not open for further replies.

waltron

Technical User
Jul 30, 2009
2
AU
hello
i have a code that searches column B for data entered in textbox, when the data is located it highlights active row yellow, i then added the following code so that when i changed from highlighted cell the row changed back to no fill. it worked but now i can not cut and paste within the sheet? can this be fixed.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("$B:$I").Interior.ColorIndex = xlNone
Intersect(Target.EntireRow, Range("$B:$I")).Interior.ColorIndex = xlNone
Range("B5:I5").Interior.ColorIndex = 34
Range("B9:I9").Interior.ColorIndex = 35
End Sub
 



Hi,

That's just the way that the SelectionChange event works.

Try instead, writing a value to an unused column on the found row, and using the conditional formatting feature to change the shading, rather than SelectionChange.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top