+ Reply to Thread
Results 1 to 5 of 5

VBA Code for a Required Cell

  1. #1
    Registered User
    Join Date
    10-26-2006
    Posts
    26

    VBA Code for a Required Cell

    Hello All,

    Does anyone know how I can require a cell to be filled out before it can be saved?

    Example

    When a user clicks "Save" if cell A3 is blank an error message will pop up and say "You must ........etc" and not save.

    Thanks.

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    Could the following help ...

    Please Login or Register  to view this content.
    HTH
    Carim

  3. #3
    Registered User
    Join Date
    10-26-2006
    Posts
    26
    Carim

    It works, however the workbook is still saving. How can I avoid that.....Thanks again for your help.

  4. #4
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Sorry ...
    I typed code too quickly ...

    Please Login or Register  to view this content.
    HTH
    Carim

  5. #5
    Forum Contributor
    Join Date
    11-29-2003
    Posts
    1,203
    I think Carim made a tiny error in the code. If A3 is NOT filled in you want to Cancel the Save. The way it was written, it will cancel the save only when A3 IS filled in. I think.

    Try this just removing the Else.

    Please Login or Register  to view this content.

+ 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