click event on listbox

C

CStephenson

I have 5 listboxes when I do a click event on one of them this causes the
macros on all listboxs to run one after other?
 
G

Guest

I am assuming your list boxes are in a sheet and that you created them using
data validation? My code here assumes the list boxes are in cells A1, B1 and
C1. You can modify this for 5 list boxes placed where ever.

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$A$1"
MsgBox Target.Value
Case "$B$1"
MsgBox Target.Value
Case "$C$1"
MsgBox Target.Value
End Select

End Sub

If my assumptions are inccorect then let me know and post your code with the
reply...

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top