Announcement

Collapse
No announcement yet.

Simple InputBox$ question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simple InputBox$ question

    This is soooooo simple that I can not find any documentation on it.
    If I use a InputBox$, how do I tell if the user pressed the OK, or the Cancel, or just closed the InputBox$ instead of the Cancel?

    I thought about the return value being blank (but there are cases I need to know if the reply is blank), I even thought about some invalid return string. But there must be some way of knowing what button was pressed and not blindly using the returned string.

    Am I missing something here??????
    Engineer's Motto: If it aint broke take it apart and fix it

    "If at 1st you don't succeed... call it version 1.0"

    "Half of Programming is coding"....."The other 90% is DEBUGGING"

    "Document my code????" .... "WHYYY??? do you think they call it CODE? "

  • #2
    No, there is no way of telling which button was pressed, another limitation is no parent window can be specified. You could find the handle to the input box and subclass it, but it is easier to whip up a quick-n-dirty function with DDT to recreate the input dialog (and buttons) you need
    kgpsoftware.com | Slam DBMS | PrpT Control | Other Downloads | Contact Me

    Comment


    • #3
      Thanks Kev, I was afraid of that.

      Funny thing is, while still researching for an answer before your reply, I hit on the idea that I asked this very same question 2 years ago. InputBox$ and the cancel button

      Too bad, the search function did not show me this before, and save me the embarrassment of asking the same question twice :gurney:
      Engineer's Motto: If it aint broke take it apart and fix it

      "If at 1st you don't succeed... call it version 1.0"

      "Half of Programming is coding"....."The other 90% is DEBUGGING"

      "Document my code????" .... "WHYYY??? do you think they call it CODE? "

      Comment


      • #4
        Cancel returns a null string. Ok returns whatever the user entered.

        If user enters nothing, you can't tell what he hit. If "OK/nothing" is valid, INPUTBOX$ is probably an inferior choice of syntax for this application.
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment

        Working...
        X