Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default Prevent closing userform

Try commenting out the Unload Me line (the culprit)

"Gert-Jan" wrote in message
:

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


Reply
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
Prevent closing userform Gert-Jan[_2_] Excel Programming 0 October 8th 06 03:48 PM
How do I prevent all excel applications from closing at once? esg16 Excel Discussion (Misc queries) 1 March 27th 06 12:09 AM
Prevent DialogBox closing Patrick Simonds Excel Programming 3 October 5th 05 06:16 PM
Prevent workbook closing... Dave Excel Programming 4 October 25th 04 06:42 PM
API to prevent closing Excel Peter Dao Excel Programming 1 August 12th 03 01:35 AM


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

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

About Us

"It's about Microsoft Excel"