Apr 29, 2002 #1 dvannoy MIS May 4, 2001 2,765 US I have a form that could be opened up by multipule forms. I tryed using the following code and I keep getting Type Mismatch... Dim f As Form For Each f In frmain If TypeOf f Is Form Then f.WindowState = 1 End If Next Thanks
I have a form that could be opened up by multipule forms. I tryed using the following code and I keep getting Type Mismatch... Dim f As Form For Each f In frmain If TypeOf f Is Form Then f.WindowState = 1 End If Next Thanks
Apr 29, 2002 1 #2 CajunCenturion Programmer Mar 4, 2002 11,381 US The Forms collection is not a member of any individual form, but rather is a member of the Application. I would suggest trying the following: Dim f As Form For Each f In Forms f.WindowState = 1 Next This will minimize all forms, so you may want to place some conditional on that such as if f.Name = "<formname>" then f.windowstate = 1 endif Good Luck -------------- As a circle of light increases so does the circumference of darkness around it. - Albert Einstein Upvote 0 Downvote
The Forms collection is not a member of any individual form, but rather is a member of the Application. I would suggest trying the following: Dim f As Form For Each f In Forms f.WindowState = 1 Next This will minimize all forms, so you may want to place some conditional on that such as if f.Name = "<formname>" then f.windowstate = 1 endif Good Luck -------------- As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
Apr 29, 2002 #3 Jon4747 Programmer Aug 22, 2001 234 CA Hi, Just a guess Dim f as Control Jon Upvote 0 Downvote