We help IT Professionals succeed at work.

Own Dialog Box

nzfire asked
Medium Priority
Last Modified: 2010-05-01
Hi All,

I would like to make my own "dialog box".

What I would like to have is something that is similar to the Common Dialog, but not working with files etc, it will be working with say for instance a list of people.

I would like to be able to call this form/dialog from anywhere in my app and return a name of a person from the list on that form.

something along the lines of:


f_GetName = frmNamePopup.txtName.text

I know that the above idea wont work!!! Its just a thought.

Watch Question

High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009
frmNamePopup has a TextBox (Text1) and a CommandButton (Command1):

' --------------------
' Form1
' --------------------
Private Sub Command1_Click()
    Dim result As String
    result = frmNamePopup.ShowDialog
    Label1.Caption = result
End Sub

' --------------------
' frmNamePopup
' --------------------
Public Function ShowDialog() As String
    frmNamePopup.Show vbModal
    ShowDialog = frmNamePopup.Text1.Text
End Function

Private Sub Command1_Click()
End Sub

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


perfect!! Thanks Idle_Mind...I'll have to bear you in mind while I work on this project with a deadline!!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.