?type mismatch in if statement
Posted by Robin T on April 25, 2001 2:57 PM
The value of a66 is "f" but the if statement causes an error.
Sub Exercise()
Dim Exercise As Range
Dim CalorieBurn As Range
Dim TimeExercise As Range
Set Exercise = Application.InputBox _
(Prompt:="Select any exercise range", Title:="Exercise", Type:=8)
Set CalorieBurn = Range("c11")
Set TimeExercise = Range("c9")
Exercise.Select
If Range("a66").Value = "f" Or "F" Then
Exercise(Cells(2, 0)).Select
CalorieBurn.Value = TimeExercise.Value / 60 * ActiveCell
That is as far as I get and get a type mismatch but the value shows "f".
Thanks,
--robin t