Solved

Any idea how to edit an hyperlink on Excel to open up in a new window?

Posted on 2004-09-10
21
5,662 Views
Last Modified: 2007-12-19
Any body have an idea how to edit an hyperlink on Excel to open up in a new window?
0
Comment
Question by:morya
  • 6
  • 5
  • 3
  • +6
21 Comments
 
LVL 49

Expert Comment

by:sunray_2003
Comment Utility
not sure if this would help

If you are using IE , open IE
go to tools --> internet options --> advanced
and uncheck "reuse windows when launching shortcuts"
press OK

now check in excel
0
 

Author Comment

by:morya
Comment Utility
Thank you, but I'm looking for how
it is done within Excel, so that whoever
gets the spreadsheet and clicks on the
link the page will open up in another
window.
0
 
LVL 49

Expert Comment

by:sunray_2003
Comment Utility
morya,

why do u want to do in excel when the output is going to be in a browser and once you setup the browser in the way I have told you , it should work for all excel files ..

0
 

Author Comment

by:morya
Comment Utility
I have the excel document that is sent out to people or posted on an
Intranet site.  The owner of the excel document wants the link to
open up in a new window so that you can see the spreadsheet
in one window and then toggle to the new window easily.

What you have suggested will work only if every user that
accesses the spreadsheet configures their browser options.

Thank you, for your responses.
0
 
LVL 49

Expert Comment

by:sunray_2003
Comment Utility
Surprisingly for me in my excel 2002 , when I type in www.google.com and press on it , it opens in an IE window
If I got press again, it opens in another window. I donot have to change anything in IE options as given in my first comment
0
 
LVL 5

Expert Comment

by:OverSeer
Comment Utility
Is the link pointing to another spreadsheet or a URL?
0
 

Author Comment

by:morya
Comment Utility
The link is pointing to a pdf file that is located
in another folder of the Intranet site.
0
 
LVL 6

Expert Comment

by:nomi17
Comment Utility
I think I understand what you are trying to do and this is what I've found - this is of course assuming that you're opening another spreadsheet:

The initial Excel sheet contains links.  If you click on a link it seems to open in the same window.

Why don't you try clicking the Restore Window button (middle button - top right hand corner) of the Excel sheet.

Now click a link on the Excel sheet.  You should get your new data on another worksheet.

------------------------
If this is not the case, then I agree with sunray that I do not have to change any settings if I click on a link to a URL or a file created in another application.

0
 
LVL 5

Expert Comment

by:napoleon41
Comment Utility
I think that you are going to have to run some sort of script (either VB on the client) or something like PHP on the server-side in order to do what you are talking about.

Most people's pdf WOULD open in a new window, but with OFFICE 2003 (sounds like that's what you have), it opens in the Excel windows itself.  Victims of extra functionality.  I'm assuming that people with 2003 would have to stop that function in their settings (probably under Customize).

LOL.  Don't know if that helped at all.
0
 
LVL 4

Expert Comment

by:ashishdaga
Comment Utility
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 10

Expert Comment

by:jayca
Comment Utility
How about creating a button, that way you can put code behind it to open in a new window?
0
 
LVL 2

Accepted Solution

by:
Xestrix earned 125 total points
Comment Utility
Try Creating A Command Button With VB Code In It.
     Go to Tools --> Macros --> Visual Basic Editor.
      Now In the upper right hand corner of this new screen click the drop down box directly left of the button with the Excel logo, and Select "Module".
     Paste the following code into the new window:
------------------------------------------------------
Sub Link()
ActiveWorkbook.FollowHyperlink Address:= _
"http://www.google.com/", NewWindow:= _
False, AddHistory:=True
Application.WindowState = xlNormal
End Sub
------------------------------------------------------
Note: Change "http://www.google.com/" to the URL you are trying to open.
------------------------------------------------------
     Now exit this screen, just click the "X" in the upper-right hand corner.
     Once back at the Excel spreadsheet you need to insert a command button, if this option is not already visible, right-click on your toolbar and select "Forms" now click the "Button" button.
     Now draw the button (click and drag) on your spreadsheet.
    Once the button is created you can edit the caption, next right click on your button then select "Assign Macro".
    Select "Link" and click ok.


Now whenever you click the button the specified URL will be executed in a new Internet Explorer window.


Hope This Helps ;)

     
0
 

Author Comment

by:morya
Comment Utility
Thank you for the code.  Will it work to open up a local pdf file on the company's Intranet?
0
 
LVL 2

Expert Comment

by:Xestrix
Comment Utility
I'm pretty sure that this method will work for most any file types, if not I'll work on finding a way.
0
 
LVL 23

Expert Comment

by:gecko_au2003
Comment Utility
There is an easier way, if you make a macro called something like Startup or something, I will find out exactly in a min that runs when excel is opened and in there you can put a shell command to open the specific url you want that way when you open excel it goes to the website you want to go to !

Is that what you wanted ?

Kind regards

Shane
0
 
LVL 23

Expert Comment

by:gecko_au2003
Comment Utility
Ok here is how you make it start with excel :

http://office.microsoft.com/en-us/assistance/HA010346281033.aspx

Ok here are 2 functions that are called from within the Auto_Open macro that you create in excel :

' Auto_Open Macro for excel

Sub Auto_Open()

    ExecLink "http://google.com", vbMaximizedFocus
    OpenURL ("http://www.yahoo.com")

End Sub

' The first function

Private Sub ExecLink(Url As String, style As VbAppWinStyle)
    Shell "explorer.exe " & Url & "", style
End Sub

'The 2nd function

Public Sub OpenURL(iURL As String)
'On Error Resume Next

    Dim Temp As Object
   
    'Create instance
    Set Temp = CreateObject("InternetExplorer.Application")
   
    'Open URL
    Temp.Navigate2 iURL
    Temp.Visible = True
End Sub
0
 
LVL 23

Expert Comment

by:gecko_au2003
Comment Utility
If you wanted something manual so you dont get prompted with macros and stuff like that then you can always use the control box in excel to insert a button and insert the function you prefer to use and the call to it within the button. Obviously you would replace the URL's I have ie google and yahoo with the URL you want to launch !!

If you need help enabling the control tool box and doing anything else, let me know !

kind regards

Shane
0
 
LVL 23

Expert Comment

by:gecko_au2003
Comment Utility
There is the easy way, at the top there is a button called insert hyper link or you can go to the insert menu and click on insert hyper link and type in the URL you want it to go to.
0
 

Author Comment

by:morya
Comment Utility
Thank you to all for some really great ideas and solutions.
0
 
LVL 23

Expert Comment

by:gecko_au2003
Comment Utility
yes it should work for any file providing that the file isnt moved and if its location is moved then you will need to tell excel where you moved it to so that it can open it.
0
 
LVL 23

Expert Comment

by:gecko_au2003
Comment Utility
Here is a URL that I think shows you what you wanted to know with regards to the pdf or any other file.

http://www.microsoft.com/learning/books/troubleshooting/excel/ls/022102.asp

I think it is for office 2003 but it should be simmiliar in the other versions of office ;)
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
Using Adobe Premiere Pro, the viewer will learn how to set up a sequence with proper settings, importing pictures, rendering, and exporting the finished product.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now