LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default One IF, Two THENS

The following does close the active workbook, but it also needs to
totally exit all current sub as well as the call procedure this is part of?
any ideas?

Sub NotAllowed()
Dim Msg As String, Title As String
Dim Config As Integer, ans As Integer
Msg = " This process may NOT be used on an "
Msg = Msg & vbNewLine & vbNewLine
Msg = Msg & " 'E-Mail Safe' File"
Msg = Msg & vbNewLine & vbNewLine
Msg = Msg & " Please click on OK"
Msg = Msg & vbNewLine & vbNewLine
Msg = Msg & " You will be exited from this procedure"
Msg = Msg & vbNewLine & vbNewLine
Config = vbOKOnly = vbExclamation
ans = MsgBox(Msg, Config, Title)

If ans = vbOK Then ActiveWorkbook.Close
' Somehow require an end or exit here

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
inserting a number from a particular cell based on if/thens Peter Hansen Excel Discussion (Misc queries) 1 May 26th 08 06:40 AM
Macro to combine data based on IF,THENs? marlea[_3_] Excel Programming 3 September 15th 05 10:32 PM
Have "IF,Then" to get data from multiple columns--can I nest add'l IF,THENs? marlea Excel Worksheet Functions 1 August 31st 05 07:45 PM
Bolding with formulas and "if/thens" Abi Excel Worksheet Functions 4 January 11th 05 10:44 PM


All times are GMT +1. The time now is 07:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"