View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Type mismatch problem

I have a date in both B1 and B2 (sheet "Macro Data"). In my macro, I have the
following code:

Dim EndDate As Date
Dim StartDate As Date

StartDate = Sheets("Macro Data").Cells("B1")
EndDate = Sheets("Macro Data").Cells("B2")

The above statements are giving me error 13 (type mismatch). What's wrong
with my statements? How do I reference the date data in my macro? Thanks!

Dan