+ Reply to Thread
Results 1 to 13 of 13

How to Include Userform for Inputbox in VBA

  1. #1
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Bangalore
    MS-Off Ver
    Office 365
    Posts
    368

    Smile How to Include Userform for Inputbox in VBA

    Hello Expert,

    In the attached file I have some VBA code.

    My concern here is, when I enter the password it is visible on the screen. Instead of this I would like to get something like this ********.

    I had gone through few website and comes to userform is the way to achieve the same. However due to my lack of knowledge I am not able to incorporate the same in attached file.

    Hence, need your help to accomplish the same. Immediate help is really appreciated!

    Thanks & Regards,
    Rajeshkumar R
    Attached Files Attached Files

  2. #2
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: How to Include Userform for Inputbox in VBA

    in > User Form1
    select > Text Box 1
    in properties section.. (press f4) You will found a object called "PasswordChar"
    set this to "*"

    PS:

    Can someone please help me to modify below code so that I can use it in Immediate Window..

    Please Login or Register  to view this content.
    I tried but its not setting as desired..
    Please help..
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: How to Include Userform for Inputbox in VBA

    this will set it at design time, requires access to vba projects to be enabled.

    Please Login or Register  to view this content.
    What I think you really mean is this, add code for Pwd4 only

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Bangalore
    MS-Off Ver
    Office 365
    Posts
    368

    Re: How to Include Userform for Inputbox in VBA

    Hi Debraj Roy & Andy Pope,

    Thanks for your immediate response on my query!

    Aside Andy Pope,

    Your suggestion looks like fine for me. However, when I copy pasted the VBA code into my file and trying to access column D, I was
    getting the Error as below:-

    “Compile Error: Invalid outside Procedure”.

    Can you please help me to understand what is that, I am doing wrong and how to resolve the same?

    Thanks & Regards,
    Rajeshkumar R

  5. #5
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: How to Include Userform for Inputbox in VBA

    Hi Rajesh..

    In which sheet you are working.. in the same sheet.. at sheet name right click and view code..
    in the opened area.. delete all codes.. (if any worksheet_change alreday exists) then
    paste Pope's code there..
    no need to insert a new module.. or something..

    try again and let us know..

  6. #6
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Bangalore
    MS-Off Ver
    Office 365
    Posts
    368

    Re: How to Include Userform for Inputbox in VBA

    Hi Debraj Roy,

    Once again thanks for your replay. Can you please confirm, should I retain below mentioned codes on top of Andy Pope codes or only his suggest code is okay. If so I am wondering, no where we have defined the passowrd for each column.

    Please Login or Register  to view this content.
    Can you please clarify on this?

    Thanks & Regards,
    Rajeshkumar R


    Moderator Note:

    Pls use code tags around your code next time as per forum rules.
    Last edited by Fotis1991; 09-24-2013 at 03:18 AM.

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: How to Include Userform for Inputbox in VBA

    simply replace the event code, leave other code intact.

  8. #8
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Bangalore
    MS-Off Ver
    Office 365
    Posts
    368

    Re: How to Include Userform for Inputbox in VBA

    Hello Andy Pope,

    I tried in all the way, but due to my lack of knowledge I couldn’t able to achieve what I exactly need and also am not able to find where exactly I am doing wrong.

    Hence, Can you please share my attached excel file with your VBA Code? Hope this will be a great support for me to move forward!

    Thanks & Regards,
    Rajeshkumar R

  9. #9
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Bangalore
    MS-Off Ver
    Office 365
    Posts
    368

    Re: How to Include Userform for Inputbox in VBA

    Hi Andy Pope,

    As per your last suggestion I did and now it is working fine. But, I am find the problem as below:-

    1. After entering the correct password, userform does not exit automatically, we have to press right top “X” ie close button to get rid of userform

    2. If we enter the wrong password also, after pressing right top “X” close buttong only “Password incorrect” signal is coming

    Get rid of userform has to be automatic, once we press enter after key in the password. Can you please help me in accomplishing the same?

    Thanks & Regards,
    Rajeshkumar R

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: How to Include Userform for Inputbox in VBA

    you need to post your most recent workbook so we can see what you are working with now.

  11. #11
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Bangalore
    MS-Off Ver
    Office 365
    Posts
    368

    Re: How to Include Userform for Inputbox in VBA

    Hi Andy Pope,

    Here is my latest working file for your reference.

    Thanks & Regards,
    Rajeshkumar R

  12. #12
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: How to Include Userform for Inputbox in VBA

    You have no code in the button click events on the userform.
    Also you need to add code to check whehter the user cancelled the userform or not.

    Please Login or Register  to view this content.
    There is also some code addition to the userform code module required
    Please Login or Register  to view this content.
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    01-07-2012
    Location
    Bangalore
    MS-Off Ver
    Office 365
    Posts
    368

    Re: How to Include Userform for Inputbox in VBA

    Hi Andy Pope,

    Thank you So much for your extended support on this.

    Now the file is working exactly the way I was expecting!

    Thanks & Regards,
    Rajeshkumar R
    Last edited by Rajeshkumar R; 10-15-2013 at 09:49 AM. Reason: Query Solved

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Search sheet by inputbox entry from userform, multiple results
    By skbreen in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-15-2013, 09:06 AM
  2. USERFORM: EDIT to include FIND, DELETE & CLEAR
    By srands in forum Excel General
    Replies: 2
    Last Post: 01-03-2013, 01:15 AM
  3. [SOLVED] Just a simple userform inputbox needed
    By minifreak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2012, 12:25 PM
  4. unloading userform before Inputbox
    By 4sharkfins in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-11-2009, 11:33 PM
  5. Inputbox button control + msgbox for empty inputbox
    By D_Rennie in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-30-2009, 12:39 PM

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