Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I want to link 2 (or more....well okay, closer to 100!) excel workbooks
stored in different files using hyperlinks. Is there any macro or way that I can click on the hyperlink, go to the new workbook, and close the old workbook? I can hyperlink just fine, but it keeps opening up a new, seperate excel sheet with each new workbook I open, and it clutters up my taskbar. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If the Hyperlink is at cell C22. I would add a button for each Hyperlink
that would call a macro similar to the one below. Sub HperlinkandClose() ' ' Macro3 Macro ' Macro recorded 3/10/2007 by jwarburg ' ' Set oldworkbook = ThisWorkbook Range("C22").Select Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True oldworkbook.Close SaveChanges:=True End Sub "DariusCole" wrote: I want to link 2 (or more....well okay, closer to 100!) excel workbooks stored in different files using hyperlinks. Is there any macro or way that I can click on the hyperlink, go to the new workbook, and close the old workbook? I can hyperlink just fine, but it keeps opening up a new, seperate excel sheet with each new workbook I open, and it clutters up my taskbar. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I found a better way of closing the file. Put this code into the old
workbook in the VBA Thsiworkbook module. You can make savechanges either true or false Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, _ ByVal Target As Hyperlink) ThisWorkbook.Close savechanges:=True End Sub "DariusCole" wrote: I want to link 2 (or more....well okay, closer to 100!) excel workbooks stored in different files using hyperlinks. Is there any macro or way that I can click on the hyperlink, go to the new workbook, and close the old workbook? I can hyperlink just fine, but it keeps opening up a new, seperate excel sheet with each new workbook I open, and it clutters up my taskbar. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't make hyperlink function work for hyperlink to website | Excel Worksheet Functions | |||
How do I create a hyperlink to a cell with the hyperlink function | Excel Worksheet Functions | |||
Moving rows with Hyperlink doesn't move hyperlink address | Excel Discussion (Misc queries) | |||
Hyperlink from one sheet to the hyperlink on another | Excel Discussion (Misc queries) | |||
Intra-workbook hyperlink: macro/function to return to hyperlink ce | Excel Discussion (Misc queries) |