View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
CRayF CRayF is offline
external usenet poster
 
Posts: 115
Default What variable would I use to aquire Today()

Thanks... All works great...
This is what I ended up with...
P4 starts out as a value of "T" and Q4 equals "<- Click"
When P4 ("T"oday) is selected , it places todays date in Q4 and changes P4
to a "C" for "Clear". When selected again ("C") then it replaces todays date
with "<- Click". and P4 back to "T". This toggles back and forth when
selected.
---------------
If Target.Address = "$P$4" Then
If Range("Q4") = "<- Click" Then
With Range("Q4")
Range("Q4") = Date
Range("P4") = "C"
End With
Range("C12").Select
Else
Range("Q4") = "<- Click"
Range("P4") = "T"
Range("Q4").Select
End If
End If
---------------------------

"Ron Rosenfeld" wrote:

On Mon, 19 Sep 2005 12:07:03 -0700, "CRayF"
wrote:

I have this working except that I want 09/19/05 to equal Today()'s date
What would this line need to look like?
Range("Q4") = "09/19/05"

------------
If Target.Address = "$P$4" Then
If Range("Q4") = "mm/dd" Then
Range("Q4") = "09/19/05"
Range("C12").Select
Else
Range("Q4") = "mm/dd"
Range("Q4").Select
End If
End If
------------


Probably you want to use the Date function:

Range("Q4") = Date


--ron