Hi everyone,
I'm very new to VBA and may question may seem very simple. But nevertheless i'm kind of stuck with the task.
I have a table where in one of its columns is a drop down list. I want VBA to shade out the whole row of the table when one of the values has been chosed from the list.
I made code to format the row:
Sub shade_out_issued_PR()
Dim RowNumber As Integer
'Dim StatusCell As String - not necessary part
Dim CurrentSelection As String
RowNumber = ActiveCell.Row ' this statement assignes the row number of the current selection to variable row number
MsgBox (RowNumber) ' used to test the code, could be skipped
Range(Cells(RowNumber, 2), Cells(RowNumber, 9)).Select
Selection.Interior.Color = RGB(210, 210, 210) 'changes fill colour
Selection.Font.Color = RGB(160, 110, 110) ' changes font colour
End Sub
what I need now is to develope code, that would run the code above as soon as the value in any cell of the table column F is set to one of the drop down list values.
I know that I must place such procedure in Sheet object of the VBA object model, to get VBA react to the change.
Could you please suggest something.?
Bookmarks