anshul_singal
New Member
- Joined
- Apr 4, 2014
- Messages
- 4
Hi
I am working on a code in which i have to change the color of certain cells if the value of a cell is Y/N. The color should change with the user input.
Set wsheet = wbook.Worksheets("XYZ")
For Row_start=10 to Row_count 'Row count is the last used row in the worksheet
RowValue = ActiveCell.Row
colValue = ActiveCell.Column
if colValue = 17
If wsheet.Cells(Row_Start, 17).Value = "Y" Then
Cells(Row_Start, 18).Interior.Color = RGB(255,255,0)
Cells(Row_Start, 19).Interior.Color = RGB(255,255,0)
Cells(Row_Start, 20).Interior.Color = RGB(255,255,0)
Cells(Row_Start, 21).Interior.Color = RGB(255,255,0)
End If
End If
Next Row_start
Nothing is happening with this. How should i take the value of active cell being used by the user
Plz help
I am working on a code in which i have to change the color of certain cells if the value of a cell is Y/N. The color should change with the user input.
Set wsheet = wbook.Worksheets("XYZ")
For Row_start=10 to Row_count 'Row count is the last used row in the worksheet
RowValue = ActiveCell.Row
colValue = ActiveCell.Column
if colValue = 17
If wsheet.Cells(Row_Start, 17).Value = "Y" Then
Cells(Row_Start, 18).Interior.Color = RGB(255,255,0)
Cells(Row_Start, 19).Interior.Color = RGB(255,255,0)
Cells(Row_Start, 20).Interior.Color = RGB(255,255,0)
Cells(Row_Start, 21).Interior.Color = RGB(255,255,0)
End If
End If
Next Row_start
Nothing is happening with this. How should i take the value of active cell being used by the user
Plz help