Announcement

Collapse
No announcement yet.

Simple InputBox$ question

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

  • Michael Mattias
    replied
    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.

    Leave a comment:


  • Cliff Nichols
    replied
    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:

    Leave a comment:


  • Kev Peel
    replied
    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

    Leave a comment:


  • Cliff Nichols
    started a topic Simple InputBox$ question

    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??????
Working...
X