Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: How to make filling out a form/sheet dummy proof?

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi,
    I have created forms/sheet and wish for the person entering the data (filling them out) to fill out ALL the required fields, BEFORE they press the macro button.
    Is there something that checks all the required fields before the macros is run.

    I've looked up HELP and can't even find a topic that would help, I'm sure this is possible. Thank you for reading, purepaul

  2. #2
    MrExcel MVP lenze's Avatar
    Join Date
    Feb 2002
    Location
    Helena, MT
    Posts
    13,690
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Try this code in the worksheet module:

    Option Explicit
    Dim Required As Range

    Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    If Target.Cells.Count > 1 Then Exit Sub
    Select Case Target.Address
    Case "$A$5", "$A$10", "$A$15", "$A$20", "$A$25", "$A$30"
    Set Required = Target
    Case Else
    If Not Required Is Nothing Then
    If Required = "" Then
    Required.Select
    MsgBox "You must wnter a value here"
    End If
    End If
    End Select

    End Sub

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •