ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Hyperlink 4 Opening More Than 1 File. (https://www.excelbanter.com/excel-discussion-misc-queries/165639-hyperlink-4-opening-more-than-1-file.html)

FARAZ QURESHI

Hyperlink 4 Opening More Than 1 File.
 
Hi friends,

Any idea how to write up a Hyperlink in excel, which, when clicked, opens up
two files?

All help is appreciated!

Thanx!


Gary''s Student

Hyperlink 4 Opening More Than 1 File.
 
Using VBA, the hyperlink jump can be intercepted by a macro and the macro can
open any number of hyperlinks.
--
Gary''s Student - gsnu200755


"FARAZ QURESHI" wrote:

Hi friends,

Any idea how to write up a Hyperlink in excel, which, when clicked, opens up
two files?

All help is appreciated!

Thanx!


FARAZ QURESHI

Hyperlink 4 Opening More Than 1 File.
 
Thanx brother,

Can you give me a sample code, for example Cell(A1), when clicked, opens
C:\A.xls and C:\B.xls

By the way can one use the Hyperlink() function for two?

"Gary''s Student" wrote:

Using VBA, the hyperlink jump can be intercepted by a macro and the macro can
open any number of hyperlinks.
--
Gary''s Student - gsnu200755


"FARAZ QURESHI" wrote:

Hi friends,

Any idea how to write up a Hyperlink in excel, which, when clicked, opens up
two files?

All help is appreciated!

Thanx!


Gary''s Student

Hyperlink 4 Opening More Than 1 File.
 
I'll update this post later today
--
Gary''s Student - gsnu200755


"FARAZ QURESHI" wrote:

Thanx brother,

Can you give me a sample code, for example Cell(A1), when clicked, opens
C:\A.xls and C:\B.xls

By the way can one use the Hyperlink() function for two?

"Gary''s Student" wrote:

Using VBA, the hyperlink jump can be intercepted by a macro and the macro can
open any number of hyperlinks.
--
Gary''s Student - gsnu200755


"FARAZ QURESHI" wrote:

Hi friends,

Any idea how to write up a Hyperlink in excel, which, when clicked, opens up
two files?

All help is appreciated!

Thanx!


Gary''s Student

Hyperlink 4 Opening More Than 1 File.
 
In cell A1 insert a hyperlink that jumps to cell A1. Clicking this will not
take us to anywhere new, just back to A1. It will however trip the
FollowHyperlink event. In the worksheet code area insert the following macro:

Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
' gsnuxx
Set r = ActiveCell
If r.Address < "$A$1" Then Exit Sub
Dim s As String
Application.EnableEvents = False
s = "file:///C:\A.xls"
ActiveWorkbook.FollowHyperlink (s)
s = "file:///C:\B.xls"
ActiveWorkbook.FollowHyperlink (s)
Application.EnableEvents = True
End Sub

The macro first makes sure we are at cell A1. It then does hyperlinks to
A.xls and B.xls
--
Gary''s Student - gsnu200755


"FARAZ QURESHI" wrote:

Thanx brother,

Can you give me a sample code, for example Cell(A1), when clicked, opens
C:\A.xls and C:\B.xls

By the way can one use the Hyperlink() function for two?

"Gary''s Student" wrote:

Using VBA, the hyperlink jump can be intercepted by a macro and the macro can
open any number of hyperlinks.
--
Gary''s Student - gsnu200755


"FARAZ QURESHI" wrote:

Hi friends,

Any idea how to write up a Hyperlink in excel, which, when clicked, opens up
two files?

All help is appreciated!

Thanx!



All times are GMT +1. The time now is 06:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com