View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Automatically generate user forms

Something like this...
'----------------
Private Sub CommandButton1_Click()
Dim frmCopy As UserForm
Dim sngLeft As Single
Dim sngTop As Single

sngLeft = Me.Left + 15
sngTop = Me.Top + 15
Set frmCopy = New frmGames

With UserForms(UserForms.Count - 1)
.StartUpPosition = 0
.Left = sngLeft
.Top = sngTop
.Caption = "Players " & UserForms.Count
.Show
End With
End Sub

Private Sub CommandButton2_Click()
Me.Hide
Unload Me
End Sub
'-------------
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Rominall"
wrote in message
Okay, I think I'm missing something basic here. I have 2 user forms; i.e.
Games, Players. I want to generate 6 players forms for each number of games
entered in the "Games" form. How do I set this up? I have a "Next" button
on the "Games" form that will bring up the "Players" form but how do I keep
generating the players forms and how do I set up the variables/controls on
the "Players" forms to keep track of the information inputed.