+ Reply to Thread
Results 1 to 5 of 5

Forcing users to fill in a cell before spreadsheet will save

  1. #1
    Registered User
    Join Date
    06-23-2005
    Posts
    86

    Forcing users to fill in a cell before spreadsheet will save

    Hi all

    Can anybody help

    I have a spreadsheet that has a date field in it that I want users to fill in and save.

    Unfortunately many users forget to fill this in so I want to force it somehow.

    Is there anyway that I can get the spreadsheet to pop up with a message to say "fill in the date field" if they go to press save and it isnt filled in?

    Hopefully Ive explained it enough.

    Thanks in advance for any who read and offer advice
    Cheers

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    You could use a BeforeSave event (VBA -- should be placed within ThisWorkbook)

    Let's assume the cell that must be filled in (with a valid date) is on Sheet 1 and is cell A1

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-23-2005
    Posts
    86

    Thumbs up Thanks DonkeyOte!

    Perfect...

    Many thanks indeed.

    Is there any way of doing this without VB code?

    Cheers
    Mark

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    Nope -- I'm afraid VBA is a must.

    Even then remember as things probably stand in your file a user can circumvent this by not enabling macros in the first instance.

    Often an approach is to save the file down with all sheets hidden (except one "How to Enable Macros" sheet) with VBA (using xlVeryHidden property which means you can not unhide via Native XL) ... Then use the Workbook_Open event to display the sheets (and hide the instructions sheet)... thus if Macros are not enabled then the user can not alter the data on the hidden sheets... so although they could save the file they could not remove the date in Sheet1!A1 and save it.
    Last edited by DonkeyOte; 11-12-2008 at 05:20 AM.

  5. #5
    Registered User
    Join Date
    06-23-2005
    Posts
    86

    No matter!

    Thanks again

    Very helpful

    Cheers
    Mark

+ 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