Excel cell Validation
Private Sub Worksheet_Change(ByVal Target As Range)
Debug.Print "RUNNING" Application.EnableEvents = False
Select Case Target.Value
Case 1
Target.Value = "Read Only"
Case 2
Target.Value = "Assessor"
Case 3
Target.Value = "Reviewer"
End Select
Application.EnableEvents = True
End Sub
???
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"excelnaive" wrote in message
...
In a event macro I have to specify the column I want to change but is it
possible to do it generically I mean not tying it to one column or row and
instead put the functionality in to work for any column/row and let the user
choose which column he wants that format in?Is it possible to do that?
This is what I currently have....So how I change it so that I need not
specify target.column and make it generic......
Private Sub Worksheet_Change(ByVal Target As Range)
Debug.Print "RUNNING"
If Target.Column = 5 Then
Application.EnableEvents = False
Select Case Target.Value
Case 1
Target.Value = "Read Only"
Case 2
Target.Value = "Assessor"
Case 3
Target.Value = "Reviewer"
End Select
Application.EnableEvents = True
End If
End Sub
|