View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JMay JMay is offline
external usenet poster
 
Posts: 422
Default Clarification please...

I thought there was this rule where if you use the "If" keyword
somewhere afterwards one had to follow-up with the "End If" phrase.
Obviously not. Maybe the rule only applies in a Standard module
and not a class module like below. Can someone clarify?
Thanks in advance..


Private Sub Workbook_BeforeClose(Cancel As Boolean)
If ThisWorkbook.Sheets("Sheet1").Range("A1").Value < True _
Then Cancel = True
End Sub