+ Reply to Thread
Results 1 to 3 of 3

Show UserForm with Continue/Cancel buttons, allowing user to edit sheet

  1. #1
    Forum Contributor
    Join Date
    07-19-2010
    Location
    Huddersfield, UK
    MS-Off Ver
    Excel 2007, 2010
    Posts
    167

    Show UserForm with Continue/Cancel buttons, allowing user to edit sheet

    Morning all,

    I have several large codes which run reports that are all run through a user form. Each button calls a different proceedure. One of these proceedures opens up a raw data sheet and fills in some blank cells. If any cells can't be filled in it throws up a message box to alert the user that some data needs to be added manually.

    What I'm after is a message box to appear with this alert, and allow the user to either cancel the macro, edit the data necessary and re-run the macro from th beginnng (by clicking the user form button again), or 'suspend' the macro, make the edits, and click a button to continue the macro from where it left off.

    After doing a lot of hunting round, I've found I can't do this from a message box as it won't let you edit a worksheet while the message box is visible, and using a user form is the better way. I've created a second userform for this scenario - simple text with two buttons - Continue and Cancel.

    I can get the code to display this second userform when it finds any relevant cells, but what I'm struggling with is how to code the Continue button to jump back into the code within the first userform and resume from just after the form was called in the first place.....

    Below is the snippet of code I have already tried with the messagebox function. The user form I'm trying to call is called 'NoData', and all the code is contained within the first userform code module.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Show UserForm with Continue/Cancel buttons, allowing user to edit sheet

    Duplicate post: http://www.excelforum.com/showthread.php?t=1169176

  3. #3
    Forum Contributor
    Join Date
    07-19-2010
    Location
    Huddersfield, UK
    MS-Off Ver
    Excel 2007, 2010
    Posts
    167

    IGNORERe: Show UserForm with Continue/Cancel buttons, allowing user to edit sheet

    apologies for that - I'd clicked to submit and it came up with an error message saying the site was down, so I went back and re-tried. Apparently the first post had worked after all... Will close this one.

+ 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. Show UserForm with Continue/Cancel buttons, allowing user to edit sheet
    By dancing-shadow in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 01-16-2017, 05:33 AM
  2. Userform Cancel edit that restores all original values?
    By brucemc777 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-18-2016, 11:36 AM
  3. [SOLVED] Allowing Multiple user to enter data from a sinlgle userform
    By rv02 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-24-2016, 04:46 AM
  4. Replies: 2
    Last Post: 08-18-2013, 12:23 PM
  5. [SOLVED] Can one use a Listbox on UserForm without allowing the user to select an item?
    By StevenM in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-26-2012, 05:44 PM
  6. Userform - Continue and cancel command buttons code
    By Jessica.Bush in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-01-2010, 04:42 PM
  7. Allowing user to select a cell but not edit it?
    By Falantar in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-26-2009, 09:18 AM

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