I have a subroutine that utilizes the following simple:
[VBA]
selection.value = Date
[/VBA]
This statement is not based on a pre-defined range but relies on the cells selected by the user. It is triggered by clicking on a command button. In other words, the user highlights the cell or cells in which the current date is to be inserted, then clicks the command button and the date is inserted.
I've run into a problem, however, when only one cell is selected, i.e., the ActiveCell. When I click on the command button the entire spreadsheet is filled with the current date. Is there some way to restrict this to only the active cell when only the active cell is selected?