C
Crazy_Rick
I'm trying to read a variable from an excel sheet in the format
hh:mm:ss.000 and subtract it with a value in the same format.
This works fine if i do it in the worksheet,
A1 = 09:03:00.296
A2 = 09:03:00.203
A2 - A1 = 00:00:00.093
however if i do the same in VBA im getting a "type mismatch" error 13
Dim A1
Dim A2
A1 = Worksheets("Sheet 1").Range("A1")
A2 = Worksheets("Sheet 1").Range("A2")
Worksheets("Sheet 1").Range("A3") = A1 - A2
I appreciate any help on this.
Thomas Meixner
hh:mm:ss.000 and subtract it with a value in the same format.
This works fine if i do it in the worksheet,
A1 = 09:03:00.296
A2 = 09:03:00.203
A2 - A1 = 00:00:00.093
however if i do the same in VBA im getting a "type mismatch" error 13
Dim A1
Dim A2
A1 = Worksheets("Sheet 1").Range("A1")
A2 = Worksheets("Sheet 1").Range("A2")
Worksheets("Sheet 1").Range("A3") = A1 - A2
I appreciate any help on this.
Thomas Meixner