Thread: If greater Then
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default If greater Then

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.


"Helmut" wrote:

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