Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 163
Default Excel 2003 + macro for validation

Hi i have a set up sheet which required cells i need the users to fill in, is
it possible that when the button is pressed it highlights all the empty cells
that needs filling in giving a message to the user to go back and fill in the
required fields?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Excel 2003 + macro for validation

Hi,

Here I've sheet_Deactivate to call the code but there are several events you
could use. Note I've left the syntax in for 2 types of range

Private Sub Worksheet_Deactivate()
'For Each c In Range("A1:A10")
For Each c In Range("A1,C1,E1")
If IsEmpty(c) Then
MsgBox "You must fill in " & c.Address
Sheets("Sheet1").Activate 'Change to suit
Exit Sub
End If
Next

End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Neil Holden" wrote:

Hi i have a set up sheet which required cells i need the users to fill in, is
it possible that when the button is pressed it highlights all the empty cells
that needs filling in giving a message to the user to go back and fill in the
required fields?

Thanks.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 Data Validation DME777 Excel Discussion (Misc queries) 2 April 23rd 09 04:44 PM
Date Validation - Excel 2003 SiH23 Excel Discussion (Misc queries) 5 October 24th 07 09:28 PM
Data Validation Excel 2003 Mike Excel Worksheet Functions 4 May 8th 07 05:06 PM
Excel 2003 - Data Validation Hessen_Wraith Excel Discussion (Misc queries) 8 July 13th 06 08:43 AM
Validation Confusion-Excel 2003 Shirley Zaknich Excel Discussion (Misc queries) 2 August 17th 05 01:51 AM


All times are GMT +1. The time now is 09:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"