View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Tom Hutchins Tom Hutchins is offline
external usenet poster
 
Posts: 1,069
Default One click date + predefined text input.

This macro does what you want for a single cell (the active cell):

Sub AddDateAndComment()
ActiveCell.Value = ActiveCell.Value & vbLf & _
Format(Now(), "MM/DD/YY") & " no change"
End Sub

Here is a version that lets you select multiple cells. The current date &
"no change" comment will be added to every cell in the selection:

Sub AddDateAndComment()
Dim Rng As Range
For Each Rng In Selection
Rng.Value = Rng.Value & vbLf & _
Format(Now(), "MM/DD/YY") & " no change"
Next
End Sub

Excel's Help has instructions on how to add a custom button to a toolbar (or
a button on a worksheet), and to attach it to a macro. If you are new to
macros, this link to Jon Peltier's site may be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"James.T" wrote:

I would like to create a button on my toolbar that once clicked inputs the
current date and 2 words.

Example:
With a cell JUST selected (not in typing/edit mode) you click this button
and it automaticlly enters typing/edit mode (f2) then goes to the next line
(alt + enter) and inputs the current date =TODAY() with a space and 2 words
"no change". All without clearing the current contents of the cell. There may
be multiple lines of text already.

Any help would be appreciated. This would shave coniderable time off my
daily Excel usage.