+ Reply to Thread
Results 1 to 4 of 4

input box format

  1. #1
    Dan
    Guest

    input box format

    This is probably a simply question, but I'll feel like a dullard later. I
    have an input box that I want to format the text as *** (standard password )
    Heres what I have:

    Dim ans As String

    ans = InputBox("Enter password")
    ans = UCase(ans)
    If ans <> "PASSWORD" Then
    MsgBox "Incorrect, try again"
    Exit Sub
    ELSE
    etc ect

    Thanks

  2. #2
    Dave Peterson
    Guest

    Re: input box format

    You can't use VBA's inputbox() for this.

    But you could design a small userform that can.

    Dan wrote:
    >
    > This is probably a simply question, but I'll feel like a dullard later. I
    > have an input box that I want to format the text as *** (standard password )
    > Heres what I have:
    >
    > Dim ans As String
    >
    > ans = InputBox("Enter password")
    > ans = UCase(ans)
    > If ans <> "PASSWORD" Then
    > MsgBox "Incorrect, try again"
    > Exit Sub
    > ELSE
    > etc ect
    >
    > Thanks


    --

    Dave Peterson

  3. #3
    Harald Staff
    Guest

    Re: input box format

    See
    http://www.xcelfiles.com/API_09.html
    for a solution. Question is simple enough, but the solution is pretty
    complicated, so don't feel bad about it.

    HTH. Best wishes Harald

    "Dan" <[email protected]> skrev i melding
    news:[email protected]...
    > This is probably a simply question, but I'll feel like a dullard later. I
    > have an input box that I want to format the text as *** (standard
    > password )
    > Heres what I have:
    >
    > Dim ans As String
    >
    > ans = InputBox("Enter password")
    > ans = UCase(ans)
    > If ans <> "PASSWORD" Then
    > MsgBox "Incorrect, try again"
    > Exit Sub
    > ELSE
    > etc ect
    >
    > Thanks




  4. #4
    Tom Ogilvy
    Guest

    Re: input box format

    If I did that, would I use a textbox on the userform and set the
    passwordchar property of the textbox to "*"




    "Dave Peterson" <[email protected]> wrote in message
    news:[email protected]...
    > You can't use VBA's inputbox() for this.
    >
    > But you could design a small userform that can.
    >
    > Dan wrote:
    > >
    > > This is probably a simply question, but I'll feel like a dullard later.

    I
    > > have an input box that I want to format the text as *** (standard

    password )
    > > Heres what I have:
    > >
    > > Dim ans As String
    > >
    > > ans = InputBox("Enter password")
    > > ans = UCase(ans)
    > > If ans <> "PASSWORD" Then
    > > MsgBox "Incorrect, try again"
    > > Exit Sub
    > > ELSE
    > > etc ect
    > >
    > > Thanks

    >
    > --
    >
    > Dave Peterson




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1