ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Prevent closing userform (https://www.excelbanter.com/excel-programming/374597-prevent-closing-userform.html)

Gert-Jan[_2_]

Prevent closing userform
 
In a userform I have a button to some HTML helppages. I use this code:

Link = Range("Test!B28").Value
On Error GoTo Nocando
ActiveWorkbook.FollowHyperlink Address:=Link, NewWindow:=True
Unload Me
Exit Sub
Nocando:
MsgBox "Cannot find" & Link
start.Show

But: the userform closes also with this action. How can I prevent that?

Regards, Gert-Jan




All times are GMT +1. The time now is 07:32 PM.

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