Results 1 to 2 of 2

Thread: Inputbox question

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Inputbox question

    VB Code:
    1. Private Sub Command1_Click()
    2.     Dim p As String
    3.     p = InputBox("Enter Your Message")
    4.    
    5.     If p <> "" Then
    6.         MsgBox p
    7.     Else
    8.         MsgBox "You didnt enter anything"
    9.     End If
    10. End Sub

    but how can i make the inputs message box title be "Enter a name"

    like in msgbox we do..

    MsgBox "Hello", vbOkOnly, "WindowTitleHere"

  2. #2
    Fanatic Member paralinx's Avatar
    Join Date
    Jun 2005
    Location
    Michigan
    Posts
    987

    Re: Inputbox question

    same way as message box
    VB Code:
    1. Option Explicit
    2.     Dim sTemp As String
    3.    
    4. Private Sub Form_Load()
    5.     sTemp = InputBox("Enter Something", "Enter Something", "Something")
    6. End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width