Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dates
I am trying to select the date from Q2 and place that date in th header. How do i correct the statement below to make sure the date is capture as HDRDATE? Dim HDRDATE As Date Set HDRDATE.Value = ("Q2" -- waynehind ----------------------------------------------------------------------- waynehinds's Profile: http://www.excelforum.com/member.php...fo&userid=2533 View this thread: http://www.excelforum.com/showthread.php?threadid=38844 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dates
you are trying to treat HDRDATE as an object with the set statement. and you
dimmed it as a value Dim HDRDATE As Date HDRDATE = range("Q2") -- When you lose your mind, you free your life. "waynehinds" wrote: 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dates
Thanks for replies.. I want to now set this value to the date format "mm/dd/yy" and put in header. It is currently printing in header but it is printing m/d/yyyy -- waynehinds ------------------------------------------------------------------------ waynehinds's Profile: http://www.excelforum.com/member.php...o&userid=25331 View this thread: http://www.excelforum.com/showthread...hreadid=388444 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dates
try
HDRDATE = format(HDRDATE,"mm/dd/yy") -- When you lose your mind, you free your life. "waynehinds" wrote: Thanks for replies.. I want to now set this value to the date format "mm/dd/yy" and put in header. It is currently printing in header but it is printing m/d/yyyy -- waynehinds ------------------------------------------------------------------------ waynehinds's Profile: http://www.excelforum.com/member.php...o&userid=25331 View this thread: http://www.excelforum.com/showthread...hreadid=388444 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Dates
Thanks a lot...That did it -- waynehind ----------------------------------------------------------------------- waynehinds's Profile: http://www.excelforum.com/member.php...fo&userid=2533 View this thread: http://www.excelforum.com/showthread.php?threadid=38844 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Linking computer dates (time) to spreadsheet dates that have formu | Excel Worksheet Functions | |||
Stop dates from showing as numbers - when formated as dates | Excel Discussion (Misc queries) | |||
Toggle a range of Julian dates to Gregorian Dates and Back | Excel Programming | |||
Identifying unique dates in a range of cells containing dates... | Excel Discussion (Misc queries) | |||
need to convert list of dates to count no. of dates by week | Excel Worksheet Functions |