Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I have put together the following sub which changes the color of whatever cell is active to green. Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Excel.Range) Static DataField As Range If Not DataField Is Nothing Then DataField.Interior.ColorIndex = xlColorIndexNone End If Target.Interior.ColorIndex = 4 Set DataField = Target End Sub My problem is that I have been unable to limit this routine to a specific range of cells (actually two specific ranges) in this case D7:D14 and F7:F14 As it is right now, no matter what cell I click on, it turns green. Any help would be much appreciated. Pete |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
y-axis auto range based on data limits | Charts and Charting in Excel | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
VBA setting Range | Excel Discussion (Misc queries) | |||
range setting | Excel Programming | |||
Setting a range using VBA | Excel Programming |