+ Reply to Thread
Results 1 to 3 of 3

MsgBox Retry button

  1. #1
    Registered User
    Join Date
    10-03-2006
    Posts
    8

    Question MsgBox Retry button

    Hello all,

    I'm trying to write a vba MsgBox that will allow the user to re-enter data into a cell if it was entered incorrectly.
    If the user enters data then submits it (by moving to another cell, hitting enter, etc.) and it is not typical data a MsgBox pops up. This box has two buttons 'Retry' and 'Cancel'.

    Below is a simplification of my code:
    Please Login or Register  to view this content.
    Two questions:
    1. If the user clicks the 'Retry' button on the MsgBox, how can I go back to the calling cell and back into 'entry' mode. I.E. similar to what would happen if validation were on the cell.
    2. Is there a way I could get the data from the cell before the user entered/overwrote new data into it?


    Thanks to any with ideas
    Damask

  2. #2
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    I not sure how to achieve what you want but this line
    Please Login or Register  to view this content.
    undoes the last action of the user before the macro was run, so probably run the Undo then something like
    Please Login or Register  to view this content.
    to get going again.

    hope this helps!

    regards,
    Simon

  3. #3
    Registered User
    Join Date
    10-03-2006
    Posts
    8
    Hi Simon,

    Application.Undo is quite handy (I didn't know about that function until now!).
    Unfortunately it doesn't solve my problem - anyone else got any ideas?

    Damask

+ 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