Thread: Dates
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Dates

Don't use the 'Set' keyword. 'Set' is used to assign an object to
an object variable declared as the appropriate type.
Change your code to

HDRDATE = Range("Q2").Value


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"waynehinds"
wrote
in message
...

I am trying to select the date from Q2 and place that date in
the
header.

How do i correct the statement below to make sure the date is
captured
as HDRDATE?

Dim HDRDATE As Date
Set HDRDATE.Value = ("Q2")


--
waynehinds
------------------------------------------------------------------------
waynehinds's Profile:
http://www.excelforum.com/member.php...o&userid=25331
View this thread:
http://www.excelforum.com/showthread...hreadid=388444