Microsoft Office Tutorials and References
In Depth Information
Adding the user interface elements
Adding the user interface elements
The NumDays cell has a linked Spinner control to make it easier to specify the
number of days to include in the chart (see the previous section for information
about adding a linked Spinner control).
Using a Spinner control isn’t possible for the StartDay cell because it needs to
display dates, and the Spinner control has a maximum value of 30,000 (the date
values exceed this number). A scroll bar is an option, but a drop-down list of
available dates would be perfect. Fortunately, Excel’s Data Validation feature makes
adding a drop-down list to a cell very easy. To do so:
1. Select cell C2 and make sure that it’s formatted to display a date.
2. Choose Data
Validation to display the Data Validation dialog box (see
Figure 7-9).
3. In the Data Validation dialog box, click the Settings tab.
4. In the Allow field, choose List.
5. In the Source field, enter =$A$2:$A$60, which is the worksheet range
that contains the dates.
6. Click OK to close the Data Validation dialog box.
Figure 7-9: Specifying a range of dates for
the drop-down Data Validation list
After entering the Data Validation settings, you can then select a date when cell
C2 is activated. The selected date will be the first date in the chart. The Spinner
control determines how many total data points appear in the chart.
Search JabSto ::




Custom Search