Thread: Ending session
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Freddie Mac Freddie Mac is offline
external usenet poster
 
Posts: 21
Default Ending session

I have a macro that does alot of things. Sometimes I want to call a sub that
ends the program for whatever reason. I dont know how to write this. My code
is:

Private Sub avbrytProgrammet(varDataSaknas)
MsgBox ("Error 402. Program session aborted.")
Me.End
End Sub

The line is wrong. How do you write this?