LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Qualifying macro run according to current selection

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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Qualifying permissions in protect unprotect macro. Colin Hayes Excel Discussion (Misc queries) 4 April 26th 11 05:06 AM
How to make last cell in current selection the activecell Snowsride Excel Programming 1 September 5th 06 02:30 PM
Adding current selection RICOUK Excel Programming 3 August 27th 05 10:31 PM
Capture Current Selection in a Combo Box Randy[_10_] Excel Programming 3 August 6th 04 09:43 PM
Update on Current Selection Randal W. Hozeski Excel Programming 0 December 29th 03 04:37 PM


All times are GMT +1. The time now is 02:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"