View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Paulw2k Paulw2k is offline
external usenet poster
 
Posts: 36
Default Clarification please...

Not necessary for one-liners : if this then dothat

However,

if this then
dothat1
dothat2....
end if


Paul

"JMay" wrote in message
news:nEric.16454$VQ3.11320@lakeread06...
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