Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
E-mail Excel workbook as hyperlink Mike Milmoe Excel Discussion (Misc queries) 0 April 10th 08 05:08 PM
Hyperlink two sheets in a Excel Workbook Krishna Excel Worksheet Functions 3 September 18th 07 02:46 PM
Using a Hyperlink to send a MS Excel Workbook to Recipient Carmi Excel Discussion (Misc queries) 0 August 27th 07 11:52 AM
how can I create a save file hyperlink or macro in a workbook? Jon Peltier Excel Programming 0 December 29th 06 06:33 PM
Intra-workbook hyperlink: macro/function to return to hyperlink ce marika1981 Excel Discussion (Misc queries) 3 May 6th 05 05:47 AM


All times are GMT +1. The time now is 07:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"