View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default pull down list + value checking

The Command button should validate that there are values in the appropriate
cells prior to navigating to the next sheet. If you do it this way you can
use the built in list function of the Data - Validation

You need code similar to this in the command button

if sheets("Sheet1").range("A1").value = "" then
msgbox "Please Select a Value"
sheets("Sheet1").range("A1").select
else
sheets("Sheet2").range("A1").select
end if

HTH


"KimR.Hammel" wrote:

How do you create a pull down list in Excel? I would like to offer, say, 5
options in a pull down list and force the user to select a single one.

Other times, users simply enter a value into one or more cells.

A Command Button then takes them to the next page. Before doing so, I need
Excel to check to see if a selection has been made (in the case of the pull
down list) or if values have been entered into the appropriate cells.

Using the Data Validation option for the cells does not ensure that 1.) a
value has been entered, or 2.) the user has exited the cell--in which case
the Command Button will not work.

This must be simple but I'm yet to find it.

Thanks in advance