Thread: GREATER THAN
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default GREATER THAN

sub Tester2()
Dim num as long
num = 10 - int(rnd()*20+1)
if num 0 then
msgbox num & " is greater than 0"
else
msgbox num & " is less than or equal to 0"
End if
End Sub

--
Regards,
Tom Ogilvy

wrote in message
oups.com...
Hi,

Can anyone help me with some code, iwant to use an if statement,
declaring that if a varible is greater then 0 then do my then
statement. I cannot seem to get it right

i am using

if variable name 0 then my action