+ Reply to Thread
Results 1 to 7 of 7

A BeforeSave that I can't do

  1. #1
    Registered User
    Join Date
    11-30-2009
    Location
    Mexico
    MS-Off Ver
    Excel 2003
    Posts
    29

    Lightbulb A BeforeSave that I can't do

    Hi!!
    I need a macro or code to prevent saving if the correct data is not entered.
    I have this workbook and if the Status column says Inactive it will mark the Reason column in yellow and promt to Select option, but until they not select a valid option the workbook can't be saved, how can this be done?
    I need that a message popup and says "Please complete the information before saving"

    I attached my file so it can be better understand

    TestSave.xlsx

    Appreciate your help
    Last edited by jjislas; 08-29-2012 at 11:35 PM. Reason: Solved

  2. #2
    Registered User
    Join Date
    11-25-2008
    Location
    Poland
    MS-Off Ver
    MSO 2K3, 2K10
    Posts
    84

    Re: A BeforeSave that I can't do

    Paste to ThisWorkbook module in your project:
    Please Login or Register  to view this content.
    You must save workbook in *.xlsm format.

    Artik

  3. #3
    Registered User
    Join Date
    11-30-2009
    Location
    Mexico
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: A BeforeSave that I can't do

    Thanks Artik already added your code to the Module but it still let me save and save as the workbook, what can be wrong?

  4. #4
    Registered User
    Join Date
    11-25-2008
    Location
    Poland
    MS-Off Ver
    MSO 2K3, 2K10
    Posts
    84

    Re: A BeforeSave that I can't do

    Not in standard module, eg Module1.
    Quote Originally Posted by Artik_PL View Post
    Paste to ThisWorkbook module in your project
    Artik
    Last edited by JBeaucaire; 08-29-2012 at 07:56 PM.

  5. #5
    Registered User
    Join Date
    11-30-2009
    Location
    Mexico
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: A BeforeSave that I can't do

    Yes I paste it there.
    I went to MVBA with alt+F11 then Insert - Module and Module1 is created, I copypaste your code there but nothing happened
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    11-25-2008
    Location
    Poland
    MS-Off Ver
    MSO 2K3, 2K10
    Posts
    84

    Re: A BeforeSave that I can't do

    oh jjislas

    Look to the attached file - THISWORKBOOK MODULE

    Artik
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-30-2009
    Location
    Mexico
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: A BeforeSave that I can't do

    Thanks!!!

+ 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