=hyperlink causes file opening to change window size

B

Brettjg

I have a worbook that has an OPEN event to make the window size half the
available width. If I open a file from a cell via =hyperlink the workbook
window is always full width. Adding a worksheet activate event to resize the
window fixes the problem, but..........there are too many workbooks to go
through and a an activate event.

Is there something I could do with a followhyperlink event in the workbook
that I'm calling from? This particular workbook (TOOLS) has hyperlinks to my
entire life, so I don't really want to add activate events to everything.

Furthermore, even though I have folder options set to open folders in the
SAME window, whenevr I open a folder from TOOLS via a hyperlink, it comes up
in a separate and very annoying window (particularly if I've drilled down 2
or 3 levels). Regards Brett. (Yes Jim, I'm still at it)
 
G

Gary''s Student

Yopu can install a hyperlink in a cell two ways:

1. Insert > Hyperlink
2. use the =HYPERLINK() function

Many coders prefer the function, because it gives better control of the
link. HOWEVER, using the function puts you outside the Object Model. That
is, if you click a function-type hyperlink, no event will occur.
 
B

Brettjg

OK, thanks GS. Damn. Do you have any thoughts on the separate window for each
folder opening, or is that part of the same scope?. Regards, Brett
 
J

Jim Cone

Brett,
I added a msgbox to the workbook open event of a workbook.
I opened the workbook using a hyperlink formula and insert hyperlink.
(by clicking them from a worksheet cell)
The msgbox was displayed no matter which link was clicked.
--
Jim Cone
Portland, Oregon USA
(MS dumped about 400 newsgroup messages, this morning,
into my Outlook Express - dated 02/27/2009 and on)



"Brettjg" <[email protected]>
wrote in message
I have a worbook that has an OPEN event to make the window size half the
available width. If I open a file from a cell via =hyperlink the workbook
window is always full width. Adding a worksheet activate event to resize the
window fixes the problem, but..........there are too many workbooks to go
through and a an activate event.

Is there something I could do with a followhyperlink event in the workbook
that I'm calling from? This particular workbook (TOOLS) has hyperlinks to my
entire life, so I don't really want to add activate events to everything.

Furthermore, even though I have folder options set to open folders in the
SAME window, whenevr I open a folder from TOOLS via a hyperlink, it comes up
in a separate and very annoying window (particularly if I've drilled down 2
or 3 levels). Regards Brett. (Yes Jim, I'm still at it)
 
B

Brettjg

Hi Jim, sorry, I'm not quite sure what you're saying there. However, I added
a msgbox in the open event (for the hell of it). When the msgbox is displayed
the window is at the correct width, I click ok to msg and then the screen
goes to full width (as a result of being opened by =hyperlink). Screen
updating is set before the msgbox *as below) I can add a workshet activate
event to the masters, but it's all the old ones that concern me.

wb open()
blah blah
Application.ScreenUpdating = True
MsgBox ""

Also, do you have any idea why my folders are now opening in separate
windows (options set to same window)? This only happens when I open a folder
with =hyperlink. This is soundng a bit fishy, esp in conjunction with file
open problem. Regards, Brett
 
J

Jim Cone

Brett,
Maybe, I misread your complaint. I was pointing out that the
workbook open event does fire when a workbook is opened via
a hyperlink. Something for you to try is to place the window
sizing code in a general module and call it at the end of the
workbook open code.

As far as a multiple windows opening problem, I doubt if
I can help. However, you need to define what you mean...
Multiple windows in the same window (windows1 and windows2); or
A separate instance of excel opens with the workbook; or
The "ShowWindowsInTaskbar" property gets set to true; or ?
--
Jim Cone
Portland, Oregon USA




"Brettjg" <[email protected]>
wrote in message
Hi Jim, sorry, I'm not quite sure what you're saying there. However, I added
a msgbox in the open event (for the hell of it). When the msgbox is displayed
the window is at the correct width, I click ok to msg and then the screen
goes to full width (as a result of being opened by =hyperlink). Screen
updating is set before the msgbox *as below) I can add a workshet activate
event to the masters, but it's all the old ones that concern me.

wb open()
blah blah
Application.ScreenUpdating = True
MsgBox ""

Also, do you have any idea why my folders are now opening in separate
windows (options set to same window)? This only happens when I open a folder
with =hyperlink. This is soundng a bit fishy, esp in conjunction with file
open problem. Regards, Brett
 
B

Brettjg

Hi Jim - re multiple windows. If I open a folder by clicking an =hyperlink
cell, and then open a sub folder in the folder that I've just opened by
clicking on the subfolder icon, it opens up in a separate window, even though
folder options is set to the same window.
 

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