+ Reply to Thread
Results 1 to 2 of 2

Have cell require input before saving.

Hybrid View

  1. #1
    Registered User
    Join Date
    09-01-2005
    Posts
    13

    Have cell require input before saving.

    Is there a way to easily have a cell (or cells) require input, or the file cannot be saved? I have a simple formula setup at the moment that simply warns if no entry is detected, however, that doesn't stop end users from simply submitting the form anyway....

  2. #2
    Otto Moehrbach
    Guest

    Re: Have cell require input before saving.

    You would need a macro that is triggered by the save command. Such a macro
    would check what you want checked, and if the conditions are not met the
    save command would be cancelled. The macro can also display a message box
    telling the user the error of his ways and what he must do before he can
    save the file.
    The macro would look like this:
    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
    Boolean)
    If Sheets("This").Range("A1")="" Or Sheets("That").Range("C5")="" Then
    Cancel = True
    MsgBox "Such and such."
    End If
    Post back if this fits with what you want and you need more. This macro
    must be placed in the workbook module. To do that, right-click on the Excel
    icon immediately left of the word "File" in the menu across the top of your
    sheet, select View Code, and paste this macro in that module. Change the
    sheet name(s) and cell addresses as needed. HTH Otto
    End Sub
    "couriced" <couriced.1x7hmc_1129820713.9083@excelforum-nospam.com> wrote in
    message news:couriced.1x7hmc_1129820713.9083@excelforum-nospam.com...
    >
    > Is there a way to easily have a cell (or cells) require input, or the
    > file cannot be saved? I have a simple formula setup at the moment that
    > simply warns if no entry is detected, however, that doesn't stop end
    > users from simply submitting the form anyway....
    >
    >
    > --
    > couriced
    > ------------------------------------------------------------------------
    > couriced's Profile:
    > http://www.excelforum.com/member.php...o&userid=26900
    > View this thread: http://www.excelforum.com/showthread...hreadid=477897
    >




+ 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