![]() |
|
|
|
#1
|
||||
|
||||
|
Is this a userform? You can loop through the controls collection e.g. Code:
Dim i As Integer
Dim oCtrl As Control
For Each oCtrl In Controls
If TypeName(oCtrl) = "ComboBox" Then
If oCtrl.value = "Pickup" Then
'do stuff with oCtrl e.g.
MsgBox oCtrl.Name
Exit For
End If
End If
Next oCtrl
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Looping through emails | knarfreppep | Outlook | 2 | 04-07-2018 08:03 AM |
| Looping several slides | gabby | PowerPoint | 11 | 04-25-2015 03:05 AM |
Need help on macro for looping
|
kilosub | Word VBA | 31 | 07-27-2011 01:37 PM |
| Looping Question | Steve B | PowerPoint | 0 | 01-19-2011 10:44 AM |
| Looping video | tomasball | PowerPoint | 0 | 10-30-2010 02:38 PM |