RawlinsCross
Active Member
- Joined
- Sep 9, 2016
- Messages
- 437
Good day,
I have a dashboard on a worksheet that has 50-60 numbers, when you click on any of those numbers a 30-day trend on a userform appears. In my excel vba naivety I inserted 50-60 userforms all with identical code to form the graph. Everything works but boy, what a waste!
I have 50-60 trigger events as shown below (just first 5 shown). How do I lump them all 50-60 of these calls together and call a single class module userform when I click on any of those cells? I have figured out all the class module code - all I need to learn is how to trigger it with all the Target.Addresses I have.
I have a dashboard on a worksheet that has 50-60 numbers, when you click on any of those numbers a 30-day trend on a userform appears. In my excel vba naivety I inserted 50-60 userforms all with identical code to form the graph. Everything works but boy, what a waste!
I have 50-60 trigger events as shown below (just first 5 shown). How do I lump them all 50-60 of these calls together and call a single class module userform when I click on any of those cells? I have figured out all the class module code - all I need to learn is how to trigger it with all the Target.Addresses I have.
Code:
If Target.Address = "$K$10" Then
A212PRODUCTPCTS.Show vbModeless
End If
If Target.Cells(1).Address = "$C$14" Then
A212FLOWWATER.Show vbModeless
End If
If Target.Cells(1).Address = "$H$12" Then
A212FLOWSMD.Show vbModeless
End If
If Target.Cells(1).Address = "$M$17" Then
A212FLOWCON.Show vbModeless
End If
If Target.Cells(1).Address = "$W$19" Then
A212FLOWCPL.Show vbModeless
End If