hyperlinking to excel program with userform

R

Russ

Here's a little something that's been locking up my machine.

I have a spreadsheet that, when launched, automatically shows a
userform. I use the Workbook_Open event to show the userform. As a
standalone, this spreadsheet works fine. Now, when I hyperlink to
this spreadsheet inside a Word document and then click this hyperlink,
Word goes into "la-la" land (i.e., perpetual hourglass).

This is my Workbook_Open

Private Sub Workbook_Open()
UserForm1.Show
End Sub

My guess is the when opened via hyperlink, that there is some
confusion as to where userform1 is. But that is my guess.


Suggestions?
 
J

Jan Karel Pieterse

Hi Russ,
Private Sub Workbook_Open()
UserForm1.Show
End Sub

My guess is the when opened via hyperlink, that there is some
confusion as to where userform1 is. But that is my guess.

Suggestions?

Avoid the showing of the form like this:

Private Sub Workbook_Open()
If not Me.IsInPlace Then
UserForm1.Show
End If
End Sub


Regards,

Jan Karel Pieterse
Excel MVP
http://www.jkp-ads.com
Member of:
Professional Office Developer Association
www.proofficedev.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top