![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 1
|
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 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Helena, MT
Posts: 13,690
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|