N
Neil
Hi all,
For some reason this very simple macro is causing me grief:
I have two date fields adjacent to a macro button.
If the user presses the button, I would like the currently selected date
field (one of the two adjacent) to be filled in with the current date, ie,
'=now()' - however I do not want this field 'live' - it should only contain
the date when the macro was activated.
Normally I would do this by pasting in the equation with the macro, then
copying the selected date range and pasting over itself - values only, I'm
sure there is probably a more elegant way....
Obviously if the current selection is not one of the two date fields, I will
flag this via a MsgBox statement and exit the sub.
Your assistance in proposing a simple code to achieve the above is greatly
appreciated.
Thanks.
Neil
For some reason this very simple macro is causing me grief:
I have two date fields adjacent to a macro button.
If the user presses the button, I would like the currently selected date
field (one of the two adjacent) to be filled in with the current date, ie,
'=now()' - however I do not want this field 'live' - it should only contain
the date when the macro was activated.
Normally I would do this by pasting in the equation with the macro, then
copying the selected date range and pasting over itself - values only, I'm
sure there is probably a more elegant way....
Obviously if the current selection is not one of the two date fields, I will
flag this via a MsgBox statement and exit the sub.
Your assistance in proposing a simple code to achieve the above is greatly
appreciated.
Thanks.
Neil