I have a spreadsheet that has time listed in hours and minutes.
I need to add these times together but every now and then I get a, "Type Mismatch" error. Here is what the code looks like.
code
Public IndexArray(12, 3) As Double
Public Lvl3Sum As Date
x=3
Format(IndexArray(3, 2), "hh:mm") = Cells(x,3)
Lvl3Sum = Format(Lvl3Sum, "hh:mm") + Format(IndexArray(3, 2), "hh:mm")
code
The code is too long to list but you can see the array type is Double and Lvl3Sum is Date. I am not using a date but I thought this was the best type to use.
I need to add these times together but every now and then I get a, "Type Mismatch" error. Here is what the code looks like.
code
Public IndexArray(12, 3) As Double
Public Lvl3Sum As Date
x=3
Format(IndexArray(3, 2), "hh:mm") = Cells(x,3)
Lvl3Sum = Format(Lvl3Sum, "hh:mm") + Format(IndexArray(3, 2), "hh:mm")
code
The code is too long to list but you can see the array type is Double and Lvl3Sum is Date. I am not using a date but I thought this was the best type to use.