View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bill Buckner Bill Buckner is offline
external usenet poster
 
Posts: 4
Default VLookup function in VBA problem?

Chris

I still get a type mismatch. I checked the range for Range("Retire_Date_Primary") and it's a single cell

=Assumptions!$B$

Here is my actual line of code

retireDate = CVDate(Range("Retire_Date_Primary").Value

I tried CVDate as well as CDate function to convert it to a date and they both seem to be working. If I use the IsDate function it is true (of course it was true before I used your .Value suggestion. It prints out fine

When you said it has to be a value and not a range, Was that in reference to the VLookup function or the conversion to the retireDate variable

I'm using Excel 2000 in case that matters