If greater Then

  • Thread starter Thread starter Helmut
  • Start date Start date
H

Helmut

This is not working...

If Range("F2").Value > "109" Then

I have a Workbook_Open macro which has to check if the value in F2 is
greater than 109 then do a routine, if Value of F2 is 'empty' then end macro

thanks
 
Hi,

Try it like this

Private Sub Workbook_Open()
Set sht = Sheets("Sheet1")
If sht.Range("F2").Value > 109 Then
Call mymacro
End If

End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
Back
Top