+ Reply to Thread
Results 1 to 6 of 6

Populate required cells prior to saving

  1. #1
    Registered User
    Join Date
    08-18-2005
    Posts
    24

    Populate required cells prior to saving

    I need help with a form to be used by many people. There are several fields that I would like to have populated with text, date, phone number, etc. before the user can save the form. Is there any way to force someone to enter a field prior to saving the worksheet?

  2. #2
    Gord Dibben
    Guest

    Re: Populate required cells prior to saving

    You can have Before_Save code in ThisWorkbook module that won't let the user
    save/close the workbook.

    The efficacy of this hinges upon the user enabling macros when opening the
    workbook.

    Of course, you have to make the workbook unusable if users decide to disable
    macros.

    That is another set of code.


    Gord Dibben MS Excel MVP


    Gord Dibben MS Excel MVP

    On Wed, 28 Jun 2006 13:32:01 -0500, mhart210
    <[email protected]> wrote:

    >
    >I need help with a form to be used by many people. There are several
    >fields that I would like to have populated with text, date, phone
    >number, etc. before the user can save the form. Is there any way to
    >force someone to enter a field prior to saving the worksheet?



  3. #3
    Registered User
    Join Date
    08-18-2005
    Posts
    24
    Thank you for the tip, of course you have peaked my interest in the disabling of the worksheet. Would I use deactivate for this?

  4. #4
    Gord Dibben
    Guest

    Re: Populate required cells prior to saving

    You add a sheet to the workbook with a message "If you have disabled macros,
    this workbook is useless" or similarly frightening.

    In Before_Close sub you xlveryhidden all the sheets but that one.

    If users open the workbook with macros disabled, this is all they will see.

    If macros are enabled, your Workbook_Open code will unhide the other sheets and
    hide the message sheet and your Before_Save code will be enabled also.


    Gord



    On Thu, 29 Jun 2006 07:06:15 -0500, mhart210
    <[email protected]> wrote:

    >
    >Thank you for the tip, of course you have peaked my interest in the
    >disabling of the worksheet. Would I use deactivate for this?



  5. #5
    Registered User
    Join Date
    08-18-2005
    Posts
    24
    Thanks. Very much apperciated!!!!

  6. #6
    Registered User
    Join Date
    08-18-2005
    Posts
    24
    ok,

    I have code that checks to make sure the proper fields are filled out before saving, emailing or closing. Now I would like to do two more things.

    1) I am able to resize the window and turn off all the toolbars. The window will resize and turn on all previously turned off toolbars. I cannot get the menu bar ("Worksheet Menu Bar") to turn off/on. Any help here?

    2) I have an "Auto Save" button that once clicked, saves the file as a specified filename in "My Documents". However once I click the button and then try to close the file by clicking on the "x" box in the upper right-hand corner, it prompts me to save the file again. Is there anyway to disable this if no changes have been made to the file? (This is one of the reasons I want to eliminate the Worksheet Menu Bar, it is just gives one more way of closing/saving the file.

+ 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