PC Review


Reply
Thread Tools Rate Thread

Insert Hyperlink

 
 
=?Utf-8?B?TmlnZWw=?=
Guest
Posts: n/a
 
      9th Jan 2006
I have a worksheet and I am using code to add some Hyperlinks, I am using
code to add the hyperlink but for some unknown reason it is not entering the
sub address correctly, Here is the code maybe someone could point me in the
right direction

Range("H1").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
SubAddress:="Billing!A3:A45", TextToDisplay:="Americas"
Range("I1").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
SubAddress:="Billing!A47:A89", TextToDisplay:="Asia\Pac"
Range("J1").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
SubAddress:="Billing!A91:A133", TextToDisplay:="Eur\ROW"
Range("K1").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
SubAddress:="Billing!A135:A177", TextToDisplay:="Market"
Range("L1").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
SubAddress:="Billing!A179:A192", TextToDisplay:="Summary"

it puts A1 as the Cell Reference

Thanks

Nigel
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      9th Jan 2006
Try:

ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", _
SubAddress:="#Billing!A3:A45", TextToDisplay:="Americas"

Did you really want 43 cells selected when you click that link.

Nigel wrote:
>
> I have a worksheet and I am using code to add some Hyperlinks, I am using
> code to add the hyperlink but for some unknown reason it is not entering the
> sub address correctly, Here is the code maybe someone could point me in the
> right direction
>
> Range("H1").Select
> ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> SubAddress:="Billing!A3:A45", TextToDisplay:="Americas"
> Range("I1").Select
> ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> SubAddress:="Billing!A47:A89", TextToDisplay:="Asia\Pac"
> Range("J1").Select
> ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> SubAddress:="Billing!A91:A133", TextToDisplay:="Eur\ROW"
> Range("K1").Select
> ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> SubAddress:="Billing!A135:A177", TextToDisplay:="Market"
> Range("L1").Select
> ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> SubAddress:="Billing!A179:A192", TextToDisplay:="Summary"
>
> it puts A1 as the Cell Reference
>
> Thanks
>
> Nigel


--

Dave Peterson
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TmlnZWw=?=
Guest
Posts: n/a
 
      9th Jan 2006
No that doesn't help, I think I read somewhere you can add a hyperlink using
code

"Dave Peterson" wrote:

> Try:
>
> ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", _
> SubAddress:="#Billing!A3:A45", TextToDisplay:="Americas"
>
> Did you really want 43 cells selected when you click that link.
>
> Nigel wrote:
> >
> > I have a worksheet and I am using code to add some Hyperlinks, I am using
> > code to add the hyperlink but for some unknown reason it is not entering the
> > sub address correctly, Here is the code maybe someone could point me in the
> > right direction
> >
> > Range("H1").Select
> > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> > SubAddress:="Billing!A3:A45", TextToDisplay:="Americas"
> > Range("I1").Select
> > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> > SubAddress:="Billing!A47:A89", TextToDisplay:="Asia\Pac"
> > Range("J1").Select
> > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> > SubAddress:="Billing!A91:A133", TextToDisplay:="Eur\ROW"
> > Range("K1").Select
> > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> > SubAddress:="Billing!A135:A177", TextToDisplay:="Market"
> > Range("L1").Select
> > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> > SubAddress:="Billing!A179:A192", TextToDisplay:="Summary"
> >
> > it puts A1 as the Cell Reference
> >
> > Thanks
> >
> > Nigel

>
> --
>
> Dave Peterson
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      9th Jan 2006
It worked fine for me.

Did you already have a hyperlink in H1?

with activesheet.range("H1")
if .hyperlinks.count > 0 then
.hyperlinks.delete
end if
.parent.Hyperlinks.Add Anchor:=.cells, Address:="", _
SubAddress:="#Billing!A3:A45", TextToDisplay:="Americas"
end with

What happened when you tried it?

and did you notice the change? I added # in front of "billing".

Nigel wrote:
>
> No that doesn't help, I think I read somewhere you can add a hyperlink using
> code
>
> "Dave Peterson" wrote:
>
> > Try:
> >
> > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", _
> > SubAddress:="#Billing!A3:A45", TextToDisplay:="Americas"
> >
> > Did you really want 43 cells selected when you click that link.
> >
> > Nigel wrote:
> > >
> > > I have a worksheet and I am using code to add some Hyperlinks, I am using
> > > code to add the hyperlink but for some unknown reason it is not entering the
> > > sub address correctly, Here is the code maybe someone could point me in the
> > > right direction
> > >
> > > Range("H1").Select
> > > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> > > SubAddress:="Billing!A3:A45", TextToDisplay:="Americas"
> > > Range("I1").Select
> > > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> > > SubAddress:="Billing!A47:A89", TextToDisplay:="Asia\Pac"
> > > Range("J1").Select
> > > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> > > SubAddress:="Billing!A91:A133", TextToDisplay:="Eur\ROW"
> > > Range("K1").Select
> > > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> > > SubAddress:="Billing!A135:A177", TextToDisplay:="Market"
> > > Range("L1").Select
> > > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> > > SubAddress:="Billing!A179:A192", TextToDisplay:="Summary"
> > >
> > > it puts A1 as the Cell Reference
> > >
> > > Thanks
> > >
> > > Nigel

> >
> > --
> >
> > Dave Peterson
> >


--

Dave Peterson
 
Reply With Quote
 
=?Utf-8?B?TmlnZWw=?=
Guest
Posts: n/a
 
      10th Jan 2006
I got it to work by naming the range and then it worked fine

thanks for your help

"Dave Peterson" wrote:

> It worked fine for me.
>
> Did you already have a hyperlink in H1?
>
> with activesheet.range("H1")
> if .hyperlinks.count > 0 then
> .hyperlinks.delete
> end if
> .parent.Hyperlinks.Add Anchor:=.cells, Address:="", _
> SubAddress:="#Billing!A3:A45", TextToDisplay:="Americas"
> end with
>
> What happened when you tried it?
>
> and did you notice the change? I added # in front of "billing".
>
> Nigel wrote:
> >
> > No that doesn't help, I think I read somewhere you can add a hyperlink using
> > code
> >
> > "Dave Peterson" wrote:
> >
> > > Try:
> > >
> > > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", _
> > > SubAddress:="#Billing!A3:A45", TextToDisplay:="Americas"
> > >
> > > Did you really want 43 cells selected when you click that link.
> > >
> > > Nigel wrote:
> > > >
> > > > I have a worksheet and I am using code to add some Hyperlinks, I am using
> > > > code to add the hyperlink but for some unknown reason it is not entering the
> > > > sub address correctly, Here is the code maybe someone could point me in the
> > > > right direction
> > > >
> > > > Range("H1").Select
> > > > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> > > > SubAddress:="Billing!A3:A45", TextToDisplay:="Americas"
> > > > Range("I1").Select
> > > > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> > > > SubAddress:="Billing!A47:A89", TextToDisplay:="Asia\Pac"
> > > > Range("J1").Select
> > > > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> > > > SubAddress:="Billing!A91:A133", TextToDisplay:="Eur\ROW"
> > > > Range("K1").Select
> > > > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> > > > SubAddress:="Billing!A135:A177", TextToDisplay:="Market"
> > > > Range("L1").Select
> > > > ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="",
> > > > SubAddress:="Billing!A179:A192", TextToDisplay:="Summary"
> > > >
> > > > it puts A1 as the Cell Reference
> > > >
> > > > Thanks
> > > >
> > > > Nigel
> > >
> > > --
> > >
> > > Dave Peterson
> > >

>
> --
>
> Dave Peterson
>

 
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
Insert Hyperlink: wrong hyperlink in outlook web access =?Utf-8?B?UGF0cmlrIEx1Y2E=?= Microsoft Outlook Discussion 1 14th Jul 2007 12:11 AM
Can't insert file into a contact using Insert as Hyperlink =?Utf-8?B?R0RDcm9zcw==?= Microsoft Outlook Discussion 0 12th Oct 2006 08:38 PM
Set target frame in hyperlink created by insert hyperlink ctrl =?Utf-8?B?QmlnU2t5MTgy?= Microsoft Powerpoint 1 31st Aug 2006 10:49 PM
Insert | File > Attachmnet-Button Drop Down ;What is the difference between Insert and Insert As Attachmnet Oda Yujiro Microsoft Outlook 4 17th Jun 2004 01:53 AM
File: "Insert as Shortcut" replaced by "Insert as Hyperlink" Paul Martin Microsoft Outlook Discussion 3 23rd Feb 2004 01:44 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:45 AM.