![]() |
Using a Macro to Hyperlink to another Excel Workbook.
I want to create a button (macro) that when pressed opens another
spreadsheet (hyperlink). The problem is that when the two spreadsheets are placed on someones computer, obviously the link changes! In other programs I can use %sourceDRV%/spreadsheet2.xls as the link and that causes the program (Autoplay media for example) to search the same drive & location that the first spreadsheet is on. Is there anything I can use in VB to do the same thing? As always...Thanks in advance Jamie |
Using a Macro to Hyperlink to another Excel Workbook.
Follow the path:
Sub hyyper() p1 = "file:///" p2 = ThisWorkbook.Path p3 = "\sea_shell.xls" ActiveWorkbook.FollowHyperlink Address:=p1 & p2 & p3 End Sub Have the button run this code. -- Gary''s Student - gsnu2007k " wrote: I want to create a button (macro) that when pressed opens another spreadsheet (hyperlink). The problem is that when the two spreadsheets are placed on someones computer, obviously the link changes! In other programs I can use %sourceDRV%/spreadsheet2.xls as the link and that causes the program (Autoplay media for example) to search the same drive & location that the first spreadsheet is on. Is there anything I can use in VB to do the same thing? As always...Thanks in advance Jamie |
All times are GMT +1. The time now is 07:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com