View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rich_z[_13_] Rich_z[_13_] is offline
external usenet poster
 
Posts: 1
Default Can I assign a macro to each item in a drop-down list?


If you go into your form and click the list box you will see some cod
appear like this:


Code
-------------------

Private Sub Cust_Details_Change()

End Sub

-------------------


Place a case statement in here for each item in your list box:


Code
-------------------

Private Sub Larder_Prep_Change()
Select Case Larder_Prep.Text
Case "Bakery"
Call Routine to do bakery
Case "Fry-Ups"
Call Yumm
Case Else
'*
'* .... Mans Work
'*
Call Do_Washing_Up
End Select
End Sub

-------------------


You then put the routines to do whatever in as sub routines betwee
Sub.. End Sub.... commands.

Check out pressing the F1 key while in the VB Editor - it tells you
lot!

Regards

Ric

--
Rich_
-----------------------------------------------------------------------
Rich_z's Profile: http://www.excelforum.com/member.php...fo&userid=2473
View this thread: http://www.excelforum.com/showthread.php?threadid=38425