PC Review


Reply
Thread Tools Rate Thread

Creating a Hyperlink from 1 WKBK to open another WKBK and activate

 
 
=?Utf-8?B?QmFyYiBSZWluaGFyZHQ=?=
Guest
Posts: n/a
 
      31st May 2007
I would like to be able to click a hyperlink within an excel workbook and
that would allow me to open another workbook and activate a worksheet within
that. Is this possible to do with a hyperlink, or would i need to create
another procedure to do this? I'm thinking maybe of using a selection change
event and if I select a cell that has what I'd want for a "hyperlink" it
would open the appropriate workbook/worksheet combo. Comments?

Thanks,
Barb Reinhardt
 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      31st May 2007
=HYPERLINK("file:///C:\Documents and
Settings\User\Desktop\Book2.xls#Sheet2!B9")


will jump to Book2.xls. If Book2 is not open, Excel will open it.
--
Gary''s Student - gsnu200726


"Barb Reinhardt" wrote:

> I would like to be able to click a hyperlink within an excel workbook and
> that would allow me to open another workbook and activate a worksheet within
> that. Is this possible to do with a hyperlink, or would i need to create
> another procedure to do this? I'm thinking maybe of using a selection change
> event and if I select a cell that has what I'd want for a "hyperlink" it
> would open the appropriate workbook/worksheet combo. Comments?
>
> Thanks,
> Barb Reinhardt

 
Reply With Quote
 
=?Utf-8?B?QmFyYiBSZWluaGFyZHQ=?=
Guest
Posts: n/a
 
      31st May 2007
Thanks. What does the file:/// part do?

"Gary''s Student" wrote:

> =HYPERLINK("file:///C:\Documents and
> Settings\User\Desktop\Book2.xls#Sheet2!B9")
>
>
> will jump to Book2.xls. If Book2 is not open, Excel will open it.
> --
> Gary''s Student - gsnu200726
>
>
> "Barb Reinhardt" wrote:
>
> > I would like to be able to click a hyperlink within an excel workbook and
> > that would allow me to open another workbook and activate a worksheet within
> > that. Is this possible to do with a hyperlink, or would i need to create
> > another procedure to do this? I'm thinking maybe of using a selection change
> > event and if I select a cell that has what I'd want for a "hyperlink" it
> > would open the appropriate workbook/worksheet combo. Comments?
> >
> > Thanks,
> > Barb Reinhardt

 
Reply With Quote
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      31st May 2007
Some hyperlink apps need to know if the destination is a file or a website.
Other apps don't care. I use this form out of habit
--
Gary''s Student - gsnu200726


"Barb Reinhardt" wrote:

> Thanks. What does the file:/// part do?
>
> "Gary''s Student" wrote:
>
> > =HYPERLINK("file:///C:\Documents and
> > Settings\User\Desktop\Book2.xls#Sheet2!B9")
> >
> >
> > will jump to Book2.xls. If Book2 is not open, Excel will open it.
> > --
> > Gary''s Student - gsnu200726
> >
> >
> > "Barb Reinhardt" wrote:
> >
> > > I would like to be able to click a hyperlink within an excel workbook and
> > > that would allow me to open another workbook and activate a worksheet within
> > > that. Is this possible to do with a hyperlink, or would i need to create
> > > another procedure to do this? I'm thinking maybe of using a selection change
> > > event and if I select a cell that has what I'd want for a "hyperlink" it
> > > would open the appropriate workbook/worksheet combo. Comments?
> > >
> > > Thanks,
> > > Barb Reinhardt

 
Reply With Quote
 
=?Utf-8?B?QmFyYiBSZWluaGFyZHQ=?=
Guest
Posts: n/a
 
      31st May 2007
I'm getting a reference not valid error. This is the filepath I have

\\SERVER\FOLDER\Folder\WBName.xls#WSName!A1

I opted to create it this way
aWS.Hyperlinks.Add anchor:=aWS.Cells(lRow, WSName.Column), _
Address:="file:///" & oWB.Path & "/" & oWB.name & "#" & oWS.name &
"!A1", _
TextToDisplay:=oWS.name

What am I missing?

Thanks
Barb Reinhardt
"Gary''s Student" wrote:

> Some hyperlink apps need to know if the destination is a file or a website.
> Other apps don't care. I use this form out of habit
> --
> Gary''s Student - gsnu200726
>
>
> "Barb Reinhardt" wrote:
>
> > Thanks. What does the file:/// part do?
> >
> > "Gary''s Student" wrote:
> >
> > > =HYPERLINK("file:///C:\Documents and
> > > Settings\User\Desktop\Book2.xls#Sheet2!B9")
> > >
> > >
> > > will jump to Book2.xls. If Book2 is not open, Excel will open it.
> > > --
> > > Gary''s Student - gsnu200726
> > >
> > >
> > > "Barb Reinhardt" wrote:
> > >
> > > > I would like to be able to click a hyperlink within an excel workbook and
> > > > that would allow me to open another workbook and activate a worksheet within
> > > > that. Is this possible to do with a hyperlink, or would i need to create
> > > > another procedure to do this? I'm thinking maybe of using a selection change
> > > > event and if I select a cell that has what I'd want for a "hyperlink" it
> > > > would open the appropriate workbook/worksheet combo. Comments?
> > > >
> > > > Thanks,
> > > > Barb Reinhardt

 
Reply With Quote
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      31st May 2007
Visually, does the cell look like:
file:///\\SERVER\FOLDER\Folder\WBName.xls#WSName!A1

especially important is the:
///\\
--
Gary''s Student - gsnu200726


"Barb Reinhardt" wrote:

> I'm getting a reference not valid error. This is the filepath I have
>
> \\SERVER\FOLDER\Folder\WBName.xls#WSName!A1
>
> I opted to create it this way
> aWS.Hyperlinks.Add anchor:=aWS.Cells(lRow, WSName.Column), _
> Address:="file:///" & oWB.Path & "/" & oWB.name & "#" & oWS.name &
> "!A1", _
> TextToDisplay:=oWS.name
>
> What am I missing?
>
> Thanks
> Barb Reinhardt
> "Gary''s Student" wrote:
>
> > Some hyperlink apps need to know if the destination is a file or a website.
> > Other apps don't care. I use this form out of habit
> > --
> > Gary''s Student - gsnu200726
> >
> >
> > "Barb Reinhardt" wrote:
> >
> > > Thanks. What does the file:/// part do?
> > >
> > > "Gary''s Student" wrote:
> > >
> > > > =HYPERLINK("file:///C:\Documents and
> > > > Settings\User\Desktop\Book2.xls#Sheet2!B9")
> > > >
> > > >
> > > > will jump to Book2.xls. If Book2 is not open, Excel will open it.
> > > > --
> > > > Gary''s Student - gsnu200726
> > > >
> > > >
> > > > "Barb Reinhardt" wrote:
> > > >
> > > > > I would like to be able to click a hyperlink within an excel workbook and
> > > > > that would allow me to open another workbook and activate a worksheet within
> > > > > that. Is this possible to do with a hyperlink, or would i need to create
> > > > > another procedure to do this? I'm thinking maybe of using a selection change
> > > > > event and if I select a cell that has what I'd want for a "hyperlink" it
> > > > > would open the appropriate workbook/worksheet combo. Comments?
> > > > >
> > > > > Thanks,
> > > > > Barb Reinhardt

 
Reply With Quote
 
=?Utf-8?B?QmFyYiBSZWluaGFyZHQ=?=
Guest
Posts: n/a
 
      31st May 2007
I tried manually entering it with the Hyperlink formula and have this

=HYPERLINK("file:///\\SERVER\projects\Measures\Measures Team\Measurement
Program Workbooks\Supporting_Materials\easurement
Specifications\Submitted\WORKBOOK.xls#WORKSHEET!A1","WORKSHEET")

I get the same error.



"Gary''s Student" wrote:

> Visually, does the cell look like:
> file:///\\SERVER\FOLDER\Folder\WBName.xls#WSName!A1
>
> especially important is the:
> ///\\
> --
> Gary''s Student - gsnu200726
>
>
> "Barb Reinhardt" wrote:
>
> > I'm getting a reference not valid error. This is the filepath I have
> >
> > \\SERVER\FOLDER\Folder\WBName.xls#WSName!A1
> >
> > I opted to create it this way
> > aWS.Hyperlinks.Add anchor:=aWS.Cells(lRow, WSName.Column), _
> > Address:="file:///" & oWB.Path & "/" & oWB.name & "#" & oWS.name &
> > "!A1", _
> > TextToDisplay:=oWS.name
> >
> > What am I missing?
> >
> > Thanks
> > Barb Reinhardt
> > "Gary''s Student" wrote:
> >
> > > Some hyperlink apps need to know if the destination is a file or a website.
> > > Other apps don't care. I use this form out of habit
> > > --
> > > Gary''s Student - gsnu200726
> > >
> > >
> > > "Barb Reinhardt" wrote:
> > >
> > > > Thanks. What does the file:/// part do?
> > > >
> > > > "Gary''s Student" wrote:
> > > >
> > > > > =HYPERLINK("file:///C:\Documents and
> > > > > Settings\User\Desktop\Book2.xls#Sheet2!B9")
> > > > >
> > > > >
> > > > > will jump to Book2.xls. If Book2 is not open, Excel will open it.
> > > > > --
> > > > > Gary''s Student - gsnu200726
> > > > >
> > > > >
> > > > > "Barb Reinhardt" wrote:
> > > > >
> > > > > > I would like to be able to click a hyperlink within an excel workbook and
> > > > > > that would allow me to open another workbook and activate a worksheet within
> > > > > > that. Is this possible to do with a hyperlink, or would i need to create
> > > > > > another procedure to do this? I'm thinking maybe of using a selection change
> > > > > > event and if I select a cell that has what I'd want for a "hyperlink" it
> > > > > > would open the appropriate workbook/worksheet combo. Comments?
> > > > > >
> > > > > > Thanks,
> > > > > > Barb Reinhardt

 
Reply With Quote
 
=?Utf-8?B?QmFyYiBSZWluaGFyZHQ=?=
Guest
Posts: n/a
 
      31st May 2007
I've even put single quotes around the WS name in the hyperlink because I
know that can cause problems. No dice.

"Gary''s Student" wrote:

> Visually, does the cell look like:
> file:///\\SERVER\FOLDER\Folder\WBName.xls#WSName!A1
>
> especially important is the:
> ///\\
> --
> Gary''s Student - gsnu200726
>
>
> "Barb Reinhardt" wrote:
>
> > I'm getting a reference not valid error. This is the filepath I have
> >
> > \\SERVER\FOLDER\Folder\WBName.xls#WSName!A1
> >
> > I opted to create it this way
> > aWS.Hyperlinks.Add anchor:=aWS.Cells(lRow, WSName.Column), _
> > Address:="file:///" & oWB.Path & "/" & oWB.name & "#" & oWS.name &
> > "!A1", _
> > TextToDisplay:=oWS.name
> >
> > What am I missing?
> >
> > Thanks
> > Barb Reinhardt
> > "Gary''s Student" wrote:
> >
> > > Some hyperlink apps need to know if the destination is a file or a website.
> > > Other apps don't care. I use this form out of habit
> > > --
> > > Gary''s Student - gsnu200726
> > >
> > >
> > > "Barb Reinhardt" wrote:
> > >
> > > > Thanks. What does the file:/// part do?
> > > >
> > > > "Gary''s Student" wrote:
> > > >
> > > > > =HYPERLINK("file:///C:\Documents and
> > > > > Settings\User\Desktop\Book2.xls#Sheet2!B9")
> > > > >
> > > > >
> > > > > will jump to Book2.xls. If Book2 is not open, Excel will open it.
> > > > > --
> > > > > Gary''s Student - gsnu200726
> > > > >
> > > > >
> > > > > "Barb Reinhardt" wrote:
> > > > >
> > > > > > I would like to be able to click a hyperlink within an excel workbook and
> > > > > > that would allow me to open another workbook and activate a worksheet within
> > > > > > that. Is this possible to do with a hyperlink, or would i need to create
> > > > > > another procedure to do this? I'm thinking maybe of using a selection change
> > > > > > event and if I select a cell that has what I'd want for a "hyperlink" it
> > > > > > would open the appropriate workbook/worksheet combo. Comments?
> > > > > >
> > > > > > Thanks,
> > > > > > Barb Reinhardt

 
Reply With Quote
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      31st May 2007
First carefully re-check the spelling of the server name and the other parts
of the folder structure.

Secondly try the string without the file:///

I can see nothing wrong with what you have done, but I can't test it without
have your specific folder structure. Sorry
--
Gary''s Student - gsnu200726


"Barb Reinhardt" wrote:

> I've even put single quotes around the WS name in the hyperlink because I
> know that can cause problems. No dice.
>
> "Gary''s Student" wrote:
>
> > Visually, does the cell look like:
> > file:///\\SERVER\FOLDER\Folder\WBName.xls#WSName!A1
> >
> > especially important is the:
> > ///\\
> > --
> > Gary''s Student - gsnu200726
> >
> >
> > "Barb Reinhardt" wrote:
> >
> > > I'm getting a reference not valid error. This is the filepath I have
> > >
> > > \\SERVER\FOLDER\Folder\WBName.xls#WSName!A1
> > >
> > > I opted to create it this way
> > > aWS.Hyperlinks.Add anchor:=aWS.Cells(lRow, WSName.Column), _
> > > Address:="file:///" & oWB.Path & "/" & oWB.name & "#" & oWS.name &
> > > "!A1", _
> > > TextToDisplay:=oWS.name
> > >
> > > What am I missing?
> > >
> > > Thanks
> > > Barb Reinhardt
> > > "Gary''s Student" wrote:
> > >
> > > > Some hyperlink apps need to know if the destination is a file or a website.
> > > > Other apps don't care. I use this form out of habit
> > > > --
> > > > Gary''s Student - gsnu200726
> > > >
> > > >
> > > > "Barb Reinhardt" wrote:
> > > >
> > > > > Thanks. What does the file:/// part do?
> > > > >
> > > > > "Gary''s Student" wrote:
> > > > >
> > > > > > =HYPERLINK("file:///C:\Documents and
> > > > > > Settings\User\Desktop\Book2.xls#Sheet2!B9")
> > > > > >
> > > > > >
> > > > > > will jump to Book2.xls. If Book2 is not open, Excel will open it.
> > > > > > --
> > > > > > Gary''s Student - gsnu200726
> > > > > >
> > > > > >
> > > > > > "Barb Reinhardt" wrote:
> > > > > >
> > > > > > > I would like to be able to click a hyperlink within an excel workbook and
> > > > > > > that would allow me to open another workbook and activate a worksheet within
> > > > > > > that. Is this possible to do with a hyperlink, or would i need to create
> > > > > > > another procedure to do this? I'm thinking maybe of using a selection change
> > > > > > > event and if I select a cell that has what I'd want for a "hyperlink" it
> > > > > > > would open the appropriate workbook/worksheet combo. Comments?
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Barb Reinhardt

 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      31st May 2007
I turned on the macro recorder and did it manually

ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"\\DAFFY\data\AGENCIES\D4\POT\DATA\Dpl-div\DB BOOMER\dm metrics.xls" _
, SubAddress:="'Option 2B'!F9", TextToDisplay:= _

If I hover over the hyperlink, it does display a popup with

File:///\\DAFFY\data\AGENCIES\D4\POT\DATA\Dpl-div\DB BOOMER\dm metrics.xls -
'Option 2B!F9'

but I didn't need to use that format to create it.

--
Regards,
Tom Ogilvy


"Barb Reinhardt" wrote:

> I've even put single quotes around the WS name in the hyperlink because I
> know that can cause problems. No dice.
>
> "Gary''s Student" wrote:
>
> > Visually, does the cell look like:
> > file:///\\SERVER\FOLDER\Folder\WBName.xls#WSName!A1
> >
> > especially important is the:
> > ///\\
> > --
> > Gary''s Student - gsnu200726
> >
> >
> > "Barb Reinhardt" wrote:
> >
> > > I'm getting a reference not valid error. This is the filepath I have
> > >
> > > \\SERVER\FOLDER\Folder\WBName.xls#WSName!A1
> > >
> > > I opted to create it this way
> > > aWS.Hyperlinks.Add anchor:=aWS.Cells(lRow, WSName.Column), _
> > > Address:="file:///" & oWB.Path & "/" & oWB.name & "#" & oWS.name &
> > > "!A1", _
> > > TextToDisplay:=oWS.name
> > >
> > > What am I missing?
> > >
> > > Thanks
> > > Barb Reinhardt
> > > "Gary''s Student" wrote:
> > >
> > > > Some hyperlink apps need to know if the destination is a file or a website.
> > > > Other apps don't care. I use this form out of habit
> > > > --
> > > > Gary''s Student - gsnu200726
> > > >
> > > >
> > > > "Barb Reinhardt" wrote:
> > > >
> > > > > Thanks. What does the file:/// part do?
> > > > >
> > > > > "Gary''s Student" wrote:
> > > > >
> > > > > > =HYPERLINK("file:///C:\Documents and
> > > > > > Settings\User\Desktop\Book2.xls#Sheet2!B9")
> > > > > >
> > > > > >
> > > > > > will jump to Book2.xls. If Book2 is not open, Excel will open it.
> > > > > > --
> > > > > > Gary''s Student - gsnu200726
> > > > > >
> > > > > >
> > > > > > "Barb Reinhardt" wrote:
> > > > > >
> > > > > > > I would like to be able to click a hyperlink within an excel workbook and
> > > > > > > that would allow me to open another workbook and activate a worksheet within
> > > > > > > that. Is this possible to do with a hyperlink, or would i need to create
> > > > > > > another procedure to do this? I'm thinking maybe of using a selection change
> > > > > > > event and if I select a cell that has what I'd want for a "hyperlink" it
> > > > > > > would open the appropriate workbook/worksheet combo. Comments?
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Barb Reinhardt

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy sheets from source wkbk to another wkbk Diddy Microsoft Excel Programming 4 21st Aug 2008 01:48 PM
Find WkBk Path, Then use this path to open another WkBk in Subfold dim Microsoft Excel Programming 10 23rd Apr 2008 01:00 AM
run a procedure in 1 wkbk from another wkbk =?Utf-8?B?Y2FyZW5sYQ==?= Microsoft Excel Programming 1 7th Jul 2005 05:40 PM
Open Object as Wkbk opens =?Utf-8?B?TXlyaWFt?= Microsoft Excel Programming 0 6th Apr 2005 04:07 PM
Error Message Wkbk Open Tom Ulincy Microsoft Excel Programming 1 6th Aug 2003 04:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:53 PM.