I am working on an employee scheduling aid that displays a popup message for each employee (when clicked) with the skill set that that particular employee has.
This code works for the one employee I set it up for:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Rng1 As Range
Set Rng = Range("A54")
If Intersect(Target, Rng) Is Nothing Then Exit Sub
MsgBox "This employee's skill set includes: " & Sheet2.Range("B54").Value
End Sub
How can I get it to work for all employees without writing the code for each of the 400+ employees in the schedule? I'm having trouble finding answers.
Thanks for your help!
This code works for the one employee I set it up for:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Rng1 As Range
Set Rng = Range("A54")
If Intersect(Target, Rng) Is Nothing Then Exit Sub
MsgBox "This employee's skill set includes: " & Sheet2.Range("B54").Value
End Sub
How can I get it to work for all employees without writing the code for each of the 400+ employees in the schedule? I'm having trouble finding answers.
Thanks for your help!