View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Wally Steadman[_4_] Wally Steadman[_4_] is offline
external usenet poster
 
Posts: 16
Default If Then Statements

Figured it out. Had to move all after THEN to next line.


"Wally Steadman" wrote in message
...
I have this simple code:

sub printsheet()

If Worksheets(1).Cells(1, 1) < " " Then Worksheets(1).printout

End If

end sub

I keep getting a COMPILE ERROR: End If without Block if.

My If Then syntax appears to be coorect based on the help file, what am I
doing wrong?