+ Reply to Thread
Results 1 to 9 of 9

Retry Logic

  1. #1
    Forum Contributor
    Join Date
    02-12-2011
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    261

    Retry Logic

    Hi All

    I have a userform with a text box & command button. Idea is when the user clicks the command button with out any data in the text box
    message pops every time to inform that data should be present before clicking that add button.
    A max of three times user can click beyond which the code closes the application.

    Need help in that retry logic what should we do so that i is counted each time and third time is the last chance. the attachment contains only one sheet
    and one userform.

    Thank you all

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Never confuse a single defeat to the final defeat.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Retry Logic

    How about
    Please Login or Register  to view this content.

  3. #3
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,814

    Re: Retry Logic

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  4. #4
    Forum Contributor
    Join Date
    02-12-2011
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    261

    Re: Retry Logic

    Thank you very much Mumps and Fulfyy totally agree with both your solutions.

    But just in case if i have write something for a retry logic when i capture the error(retry) how to do that.
    Last edited by grkchakri; 08-21-2020 at 11:17 AM. Reason: Typo

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Retry Logic

    There is no error to capture, so not quite sure what you mean.

  6. #6
    Forum Contributor
    Join Date
    02-12-2011
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    261

    Re: Retry Logic

    let say while xy as integer operator had entered alphabet and we want that error to be captured. and if user keeps on entering that thrice then we should close the userform . would that be a scneario where we have captured error.

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Retry Logic

    Sorry, but I don't understand.
    Whilst you have declared XY as integer, you have never assigned it a value.

  8. #8
    Forum Contributor
    Join Date
    02-12-2011
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007
    Posts
    261

    Re: Retry Logic

    Apologies got confused between the data item and the text box values. your logic stands good , hence closing it as solved. thank you once again.

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Retry Logic

    You're welcome & thanks for the feedback.

+ 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] On Error retry SaveAs x times
    By mrkawht in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-17-2020, 02:06 PM
  2. Sumifs - retry
    By Eric Tsang in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-10-2016, 11:52 AM
  3. [SOLVED] On error - Retry
    By kenny.fsw in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2014, 12:15 PM
  4. vba to reproduce data..validation retry button feature:
    By larryagrossman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-11-2012, 11:28 PM
  5. How to retry refreshing excel sheet through vbs
    By rajeshksv37 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-30-2009, 07:46 AM
  6. MsgBox Retry button
    By Damask in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-16-2006, 10:47 PM
  7. [SOLVED] Retry: VLOOKUP nested in IF Statement
    By Michele in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-06-2005, 04:20 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