Results 1 to 2 of 2

Thread: custom input box

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    custom input box

    I got MartinLiss' custom input box (found HERE) and I'm using it to return a string in a function.. The function I'm using is:

    VB Code:
    1. Private Sub cmd_start_Click()
    2.   Dim lala
    3.   lala = InputBox2("test", "test2")
    4.   MsgBox lala
    5. End Sub
    6.  
    7. Private Function InputBox2(prm As String, ttl As String) As String
    8.   frmInputBox.title = prm
    9.   frmInputBox.prompt = ttl
    10.   frmInputBox.Display
    11. End Function

    Maybe I'm not thinking right, but I can't find a way for the input box to return the value to "lala".. is there any way to do this? If you want to check out the input box script, just download it off of that link.
    Like Archer? Check out some Sterling Archer quotes.

  2. #2
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    you have to return the value from the inputbox in your function...

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub cmd_start_Click()
    4.   Dim lala
    5.   lala = InputBox2("test", "test2")
    6.   MsgBox lala
    7. End Sub
    8.  
    9. Private Function InputBox2(prm As String, ttl As String) As String
    10.   frmInputBox.Title = prm
    11.   frmInputBox.Prompt = ttl
    12.   frmInputBox.Display
    13.   InputBox2 = frmInputBox.txtInput.Text
    14. End Function
    -= a peet post =-

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