+ Reply to Thread
Results 1 to 10 of 10

"Exit" CommandButton needs to override Textbox conditions

  1. #1
    Forum Contributor
    Join Date
    04-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    329

    "Exit" CommandButton needs to override Textbox conditions

    Good day all,

    I have a userform with textboxes that if blank will not let the user proceed, the problem I have is if the user requires to just exit the userform my textbox conditions prevent them, is there a code I can attach to my "Exit" commandButton to override the textbox conditions?

    Thank you all & have a great day - Marco

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: "Exit" CommandButton needs to override Textbox conditions

    Hi matrixpom,

    That would depend on the how the Code is written, and without seeing the actual Code, we would not really be able to assist you.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Contributor
    Join Date
    04-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    329

    Re: "Exit" CommandButton needs to override Textbox conditions

    No worries Winon, please find code below

    Textbox code:

    Please Login or Register  to view this content.
    My Exit cmd button code is:

    Please Login or Register  to view this content.
    Last edited by matrixpom; 10-25-2012 at 08:49 PM.

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: "Exit" CommandButton needs to override Textbox conditions

    Thank you,

    Now, for the Exit Button try:

    Please Login or Register  to view this content.
    Hope that helps.

  5. #5
    Forum Contributor
    Join Date
    04-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    329

    Re: "Exit" CommandButton needs to override Textbox conditions

    Hi Winon,

    Strange...it looks like your code should work but I still get my message "ABN Required" I've taken out "cancel=True" from my textbox code & now exit works but only on the second attempt?

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: "Exit" CommandButton needs to override Textbox conditions

    Hi matrixpom,

    Could you upload a sample WorkBook with all the relevant Code, for us to have a look at.?

  7. #7
    Forum Contributor
    Join Date
    04-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    329

    Re: "Exit" CommandButton needs to override Textbox conditions

    Hi Winon,

    Please find attached & thank you for your time - Marco
    Attached Files Attached Files

  8. #8
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: "Exit" CommandButton needs to override Textbox conditions

    Hi matrixpom,

    I did not want to change too much of the user input checks on the UserForm, but see if you can make do with the attached Workbook as it is now.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    04-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    329

    Re: "Exit" CommandButton needs to override Textbox conditions

    Yes...it does work, i need to get this workbook out Nationally ASAP, so this will buy me loads of time, than you Winon, you have a great weekend! Marco

  10. #10
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: "Exit" CommandButton needs to override Textbox conditions

    You are welcome.

    Glad I could help a little.

+ 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