Microsoft Office Tutorials and References
In Depth Information
Providing a Calendar to Choose Dates for Input
Case Is > 75000¶
Cll.Interior.Color = 128¶
End Select¶
Next Cll¶
End If¶
End Sub¶
View the Appendix to learn how to store the following
procedure in a Worksheet module.
Exl
Option Explicit¶
' * * * * *¶
Private Sub Worksheet_Change(ByVal Target As Range)¶
ConditionalFormat Target¶
End Sub¶
This procedure has two main items that can be changed:
The range to which it applies; currently, it is hard-coded to work for
cells A1:A100.
¾
The conditions and the formats to be applied. The 'Change the following
variables' section of the code is where the conditional format is created
and applied. Changing colors and borders in this section of the code
affects the cells in the workbook.
¾
These macros run automatically as long as macros are enabled in the
workbook.
Providing a Calendar to Choose Dates for Input
Use this procedure to facilitate the entry of dates by displaying a calendar with
which the user can interact.
Example file:
E012.xls
Scenario: Ensuring that users enter dates correctly is not
always an easy task in Excel. This example shows how to
program the double-click event on certain cells. The user can
double-click the cell and actually choose a date instead of
having to type it. This approach reduces errors, especially if
the workbook is going to be used in different countries.
 
Search JabSto ::




Custom Search