Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Location
    Toronto
    Posts
    11

    Lightbulb Unanswered: Customize InputBox

    Hi,

    does Anyone have an idea on how to customize an inputbox in VBA
    I created a form with a textbox, an OK button, and a Cancel button.
    I want to load it whenever I wish to, read the text box value into a public variable, click Ok... the variable should be used in another form's code

    thanks

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1

    Re: Customize InputBox

    Originally posted by badr
    Hi,

    does Anyone have an idea on how to customize an inputbox in VBA
    I created a form with a textbox, an OK button, and a Cancel button.
    I want to load it whenever I wish to, read the text box value into a public variable, click Ok... the variable should be used in another form's code

    thanks
    Declare a global variable in a module and set it to the value of the text box in the OnClick event of the ok button.

  3. #3
    Join Date
    Dec 2003
    Location
    Toronto
    Posts
    11
    do you have sample code?
    thanx

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    I like to keep all global variables in a seperate module for simple structuring.

    Create a new module and declare a string variable:

    Global myString As String




    That's it.

    Now you can read and write to that variable from any other form or module in your application by calling myString.

Posting Permissions

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