Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing a from using an index

Status
Not open for further replies.

mcgibbong

Programmer
Jan 17, 2002
38
GB
I want to pick up a form name to use in a loop. Is there any way to acces forms in a similar way to formfields ie using an index? ie forms(0).name = Myfirst form

Thanks
 
Sorry they are userforms not 'froms' as in my title in word.

Gary
 
The only way I know of is to reference the

activedocument.vbproject.vbcomponents

collection. Components with .type=3 are userforms. But I can't think of an easy way to then access the underlying object (e.g., show that userform). You CAN do it by writing code on the fly, but that sounds like more work than you bargained for.
Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top