Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
 
TitleLet the user name a form to display
DescriptionThis example shows how to let the user name a form to display in Visual Basic 6. It uses the Forms collection's Add method to make the form and then calls its Show method.
Keywordsform, display, InputBox, show form
CategoriesControls, Tips and Tricks
 
Thanks to Muad Darawshee.

When the user clicks the New Form button, the program uses the InputBox method to get the name of the form to load. It adds the name to the Forms collection and uses the new form's Show method.

 
Private Sub cmdNewForm_Click()
Dim form_name As String

    form_name = InputBox("Form Name")
    If Len(form_name) > 0 Then Forms.Add(form_name).Show
End Sub
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated