Defining controls to be enumerated

dan-cat

Registered User.
Local time
Today, 23:01
Joined
Jun 2, 2002
Messages
3,433
Hello,

When enumerating a set of controls within a collection - is it possible to define which controls are enumerated by their name.

For example I want to enumerate all the controls within a tab page that start with the name thumb*.

This is what I have done:


Dim img As Control
For Each img In Me.tab1.Pages(1).Controls
If img.Name = "thumb*" Then
MsgBox img.Name
Else
End If
Next img
End Sub


However the wild card character doesn't work in this case.

Any ideas?

ThankYou

Dan :)
 
Equals implies literally "is equal to"

Try Like "thumb*"
 
Mile-O-Phile said:
Equals implies literally "is equal to"

Try Like "thumb*"

That's done the trick.

Had too much wine last night - can't think straight today :rolleyes:
 

Users who are viewing this thread

Back
Top Bottom