ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   aborting a sub (https://www.excelbanter.com/excel-programming/277382-aborting-sub.html)

solo_razor[_7_]

aborting a sub
 
hi,

does anybody know how i can abort a sub using the if then else
statement?

THX



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


JON-JON

aborting a sub
 
Use exit sub for example
if thisworkbook.readonly then
'do stuff
else
Exit sub
end if

How this is what you need.

regards,

Jon-jon

"solo_razor" wrote in message
...
hi,

does anybody know how i can abort a sub using the if then else
statement?

THX



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/





All times are GMT +1. The time now is 12:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com