View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_1498_] Rick Rothstein \(MVP - VB\)[_1498_] is offline
external usenet poster
 
Posts: 1
Default Converting Dates

Or, staying totally within VBA, using this for your second line instead...

s = Replace(s, "'", "20")

Rick


"Gary''s Student" wrote in message
...
Sub qwerty()
s = "Feb '08 "
s = Application.WorksheetFunction.Substitute(s, "'", "20")
MsgBox (DateValue(s))
End Sub

--
Gary''s Student - gsnu200773


"wutzke" wrote:

Given a cell value of "Feb '08 " that is text, how could I
programically convert the value to 02/01/2008 in Date values