+ Reply to Thread
Results 1 to 6 of 6

Macro Code Will Not Stop Saving In My Module

  1. #1
    Forum Contributor
    Join Date
    01-09-2016
    Location
    Surrey B.C.
    MS-Off Ver
    2013
    Posts
    155

    Thumbs up Macro Code Will Not Stop Saving In My Module

    So I am Very New with Macros. Any Help would be appreciated. I have a code That I am running in my Module. It is designed to Stop Everything (ie Invoice Register, Todays Date, Saving) Unless All Specific Cells Are filled. I have managed to splice together a code that opens a message window and higlights the blank cells. It still However continues with the rest of my Macro Including Saving. This My Complete Module Code:

    Please Login or Register  to view this content.
    Thank you in advance. Any Help would be appreciated
    Last edited by Leith Ross; 01-12-2016 at 01:16 PM. Reason: Moved Code Tags

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Macro Code Will Not Stop Saving In My Module

    TBM it is important to use code tags when posting your code so that we can read it more easily. Highlight your code and press the # symbol in the menu just above the message box.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Contributor
    Join Date
    01-09-2016
    Location
    Surrey B.C.
    MS-Off Ver
    2013
    Posts
    155

    Re: Macro Code Will Not Stop Saving In My Module

    Thank-you Arkadi
    I appreciate your help.

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Macro Code Will Not Stop Saving In My Module

    Only a small part of your code has been fixed, but if I understand this correctly, one macro (fullmacsro) calls a sequence of events. The first sub called from that one (FillCells) is the one that should stop the rest from happening if there are blanks? What is the meaning of the Cancel variable? It does not seem to be used, just assigned a true or false value.
    If I understand correctly you would like the code to stop in this area:

    Please Login or Register  to view this content.
    Cancel = True will not just stop the program, and if that is what you expected, then the code is supposed to stop running completely at that point? You could replace it with:

    Please Login or Register  to view this content.
    which would message "Incomplete Data" and then just stop all code from running right after.

  5. #5
    Forum Contributor
    Join Date
    01-09-2016
    Location
    Surrey B.C.
    MS-Off Ver
    2013
    Posts
    155

    Re: Macro Code Will Not Stop Saving In My Module

    That was it. Spent Many days reading and writing. A lot of trial and error.
    Thanks again

  6. #6
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Macro Code Will Not Stop Saving In My Module

    Glad we could help

+ 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. Help in macro code to stop code running for certain time
    By ExcelFailure in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-05-2015, 02:35 AM
  2. [SOLVED] Code locks cells when inserted in sheet module but returns error in standard module
    By yoda66 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2014, 07:39 AM
  3. [SOLVED] Convert code in a class module to a macro
    By Consty1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-11-2013, 09:44 AM
  4. VBA Code to stop users Saving
    By Dbyrne75 in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 06-10-2010, 11:20 AM
  5. how to access Sheet module, normal module, Worbook module to type code
    By alibaba in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2009, 07:51 AM
  6. Replies: 1
    Last Post: 04-10-2005, 07:07 PM
  7. Stop macro from saving changes
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-01-2005, 09:06 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