Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default simply lost on hyperlinks

from earlier post still trying to figure a hyperlink called from a
command button where i dont have to have cell displaying the hyperlink
url, which is bogus anyway because the hyperlink url is being changed
programatically anyway
the basics of what i'm using this was generously suggested keepIt Cool,
still there keepIt?

Sub ff()
Dim r As Range
Set r = [b3]
r.Hyperlinks.Add r, "", r.Address,"ClickMe"
End Sub

here is what i'm trying

Private Sub CommandButton3_Click()
Dim r As Range
Set r = [o18]
r.Hyperlinks.Add r, "", ivGraphUrl, ""
' ivGraphUrl is a public var that i set

activeworksheet.followhyperlink r

end sub

so the code works in that i get the web page in a new window
but i still get the hyperlink showing in cell 'o18' and not sure why?

and while on the subject.....
no sure about the r.hyperlinks.add syntax

my object browser has this
object.Add(Anchor, Address, SubAddress, ScreenTip, TextToDisplay)

it seems to be saying add a hyperlink to cell 018 twice, once in the
'r.' and secondly the first parameter 'r' ?????
and
i'm really using the sub address instead of the address, they are
interchangeable??

it seems the worksheet has an array of hyperlinks but i'm not adding the
hl to the sheet array directly but to a cell, there is someway to tell
what member of the hl array is for each cell??

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default simply lost on hyperlinks

yep.. I'm here.

My idea never included a commandbutton????... and the code you list is
certainly not mine :(

If you want to have a commandbutton that jumps to a website
sub CommandButton3_Click()
ActiveWorkbook.followHyperlink("http://www.microsoft.som")
end sub


BUT:
your original question was: you wanted hyperlinks where the user couldnt
see or edit the address of the hyperlink.

My solutions was to create bogus hyperlinks
The bogus hyperlink points to itself, so if the user clicks on it
it will jump to itself (do nothing) ... AND trigger a followhyperlink
event.Then use the event handler to redirect 'traffic'


Sub ThisIsJustSomeDummyCodeToQuicklyInsertHyperLinksFo rTesting()
Dim r As Range
For Each r In [a1:a4].Cells
r.Hyperlinks.Add r, "", r.Address, "Tooltip", "ClickMe"
Next
End Sub


Now open the code module for sheet1 (double click Sheet1 in VBE project
explorer. Here we can build the event HANDLER for the followhyperlink
event.


Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
'Based on WHICH HL was clicked we can now go whereever we want.
Select Case Target.Range.Address
Case "$A$1"
ActiveWorkbook.FollowHyperlink ("http://www.microsoft.com")
Case "$A$2"
ActiveWorkbook.FollowHyperlink ("http://www.adobe.com")
Case "$A$3"
ActiveWorkbook.FollowHyperlink ("http://www.google.com")
Case "$A$4"
ActiveWorkbook.FollowHyperlink ("http://www.xlSupport.com")
End Select
End Sub


Capisce?


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


bbxrider wrote:

from earlier post still trying to figure a hyperlink called from a
command button where i dont have to have cell displaying the hyperlink
url, which is bogus anyway because the hyperlink url is being changed
programatically anyway
the basics of what i'm using this was generously suggested keepIt

Cool,
still there keepIt?

Sub ff()
Dim r As Range
Set r = [b3]
r.Hyperlinks.Add r, "", r.Address,"ClickMe"
End Sub

here is what i'm trying

Private Sub CommandButton3_Click()
Dim r As Range
Set r = [o18]
r.Hyperlinks.Add r, "", ivGraphUrl, ""
' ivGraphUrl is a public var that i set

activeworksheet.followhyperlink r

end sub

so the code works in that i get the web page in a new window
but i still get the hyperlink showing in cell 'o18' and not sure why?

and while on the subject.....
no sure about the r.hyperlinks.add syntax

my object browser has this
object.Add(Anchor, Address, SubAddress, ScreenTip, TextToDisplay)

it seems to be saying add a hyperlink to cell 018 twice, once in the
'r.' and secondly the first parameter 'r' ?????
and
i'm really using the sub address instead of the address, they are
interchangeable??

it seems the worksheet has an array of hyperlinks but i'm not adding

the
hl to the sheet array directly but to a cell, there is someway to tell
what member of the hl array is for each cell??



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default simply lost on hyperlinks

hope this gets there, first reply from xnews, thanx for the tip on xnews

command button now working by 'itself' without any associated hyperlink

sorry bout the confusion, if not made clear but that was always the idea
to use a command button, thought it could/should/would be that simple,
got caught up in the hyperlink,thinking it was necessary, but many
thanks again, now understanding hyperlinks better and see what you were
doing

ran the code to create the dummy hyperlinks in my sheet, not sure what
the r.address is, its just a bogus variable so the address will be
blank, therefore the cell is blank?? .address is somehow a property of a
range object?? and i didn't get the tool tip and text to display for the
cells in the range, but not really important since i now have the
command button functioning as wanted

keepITcool wrote in
:

yep.. I'm here.

My idea never included a commandbutton????... and the code you list is
certainly not mine :(

If you want to have a commandbutton that jumps to a website
sub CommandButton3_Click()
ActiveWorkbook.followHyperlink("http://www.microsoft.som")
end sub


BUT:
your original question was: you wanted hyperlinks where the user
couldnt see or edit the address of the hyperlink.

My solutions was to create bogus hyperlinks
The bogus hyperlink points to itself, so if the user clicks on it
it will jump to itself (do nothing) ... AND trigger a followhyperlink
event.Then use the event handler to redirect 'traffic'


Sub ThisIsJustSomeDummyCodeToQuicklyInsertHyperLinksFo rTesting()
Dim r As Range
For Each r In [a1:a4].Cells
r.Hyperlinks.Add r, "", r.Address, "Tooltip", "ClickMe"
Next
End Sub


Now open the code module for sheet1 (double click Sheet1 in VBE
project explorer. Here we can build the event HANDLER for the
followhyperlink event.


Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
'Based on WHICH HL was clicked we can now go whereever we want.
Select Case Target.Range.Address
Case "$A$1"
ActiveWorkbook.FollowHyperlink ("http://www.microsoft.com")
Case "$A$2"
ActiveWorkbook.FollowHyperlink ("http://www.adobe.com")
Case "$A$3"
ActiveWorkbook.FollowHyperlink ("http://www.google.com")
Case "$A$4"
ActiveWorkbook.FollowHyperlink ("http://www.xlSupport.com")
End Select
End Sub


Capisce?


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


bbxrider wrote:

from earlier post still trying to figure a hyperlink called from a
command button where i dont have to have cell displaying the
hyperlink url, which is bogus anyway because the hyperlink url is
being changed programatically anyway
the basics of what i'm using this was generously suggested keepIt

Cool,
still there keepIt?

Sub ff()
Dim r As Range
Set r = [b3]
r.Hyperlinks.Add r, "", r.Address,"ClickMe"
End Sub

here is what i'm trying

Private Sub CommandButton3_Click()
Dim r As Range
Set r = [o18]
r.Hyperlinks.Add r, "", ivGraphUrl, ""
' ivGraphUrl is a public var that i set

activeworksheet.followhyperlink r

end sub

so the code works in that i get the web page in a new window
but i still get the hyperlink showing in cell 'o18' and not sure why?

and while on the subject.....
no sure about the r.hyperlinks.add syntax

my object browser has this
object.Add(Anchor, Address, SubAddress, ScreenTip, TextToDisplay)

it seems to be saying add a hyperlink to cell 018 twice, once in the
'r.' and secondly the first parameter 'r' ?????
and
i'm really using the sub address instead of the address, they are
interchangeable??

it seems the worksheet has an array of hyperlinks but i'm not adding

the
hl to the sheet array directly but to a cell, there is someway to
tell what member of the hl array is for each cell??




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default simply lost on hyperlinks

oops, had a bad range, now getting the cell text and tool tip
and getting values for r and r.address

thanks again

keepITcool wrote in
:

yep.. I'm here.

My idea never included a commandbutton????... and the code you list is
certainly not mine :(

If you want to have a commandbutton that jumps to a website
sub CommandButton3_Click()
ActiveWorkbook.followHyperlink("http://www.microsoft.som")
end sub


BUT:
your original question was: you wanted hyperlinks where the user
couldnt see or edit the address of the hyperlink.

My solutions was to create bogus hyperlinks
The bogus hyperlink points to itself, so if the user clicks on it
it will jump to itself (do nothing) ... AND trigger a followhyperlink
event.Then use the event handler to redirect 'traffic'


Sub ThisIsJustSomeDummyCodeToQuicklyInsertHyperLinksFo rTesting()
Dim r As Range
For Each r In [a1:a4].Cells
r.Hyperlinks.Add r, "", r.Address, "Tooltip", "ClickMe"
Next
End Sub


Now open the code module for sheet1 (double click Sheet1 in VBE
project explorer. Here we can build the event HANDLER for the
followhyperlink event.


Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
'Based on WHICH HL was clicked we can now go whereever we want.
Select Case Target.Range.Address
Case "$A$1"
ActiveWorkbook.FollowHyperlink ("http://www.microsoft.com")
Case "$A$2"
ActiveWorkbook.FollowHyperlink ("http://www.adobe.com")
Case "$A$3"
ActiveWorkbook.FollowHyperlink ("http://www.google.com")
Case "$A$4"
ActiveWorkbook.FollowHyperlink ("http://www.xlSupport.com")
End Select
End Sub


Capisce?


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


bbxrider wrote:

from earlier post still trying to figure a hyperlink called from a
command button where i dont have to have cell displaying the
hyperlink url, which is bogus anyway because the hyperlink url is
being changed programatically anyway
the basics of what i'm using this was generously suggested keepIt

Cool,
still there keepIt?

Sub ff()
Dim r As Range
Set r = [b3]
r.Hyperlinks.Add r, "", r.Address,"ClickMe"
End Sub

here is what i'm trying

Private Sub CommandButton3_Click()
Dim r As Range
Set r = [o18]
r.Hyperlinks.Add r, "", ivGraphUrl, ""
' ivGraphUrl is a public var that i set

activeworksheet.followhyperlink r

end sub

so the code works in that i get the web page in a new window
but i still get the hyperlink showing in cell 'o18' and not sure why?

and while on the subject.....
no sure about the r.hyperlinks.add syntax

my object browser has this
object.Add(Anchor, Address, SubAddress, ScreenTip, TextToDisplay)

it seems to be saying add a hyperlink to cell 018 twice, once in the
'r.' and secondly the first parameter 'r' ?????
and
i'm really using the sub address instead of the address, they are
interchangeable??

it seems the worksheet has an array of hyperlinks but i'm not adding

the
hl to the sheet array directly but to a cell, there is someway to
tell what member of the hl array is for each cell??




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
Lost hyperlinks Excell 2003-HELP Geo[_2_] Excel Discussion (Misc queries) 0 April 25th 10 02:32 PM
Hyperlinks were lost Etz99 Excel Discussion (Misc queries) 3 November 19th 09 03:32 PM
filtering simply merlin New Users to Excel 2 July 8th 09 08:05 PM
Simply Accounting JJ San Excel Discussion (Misc queries) 3 September 8th 07 06:38 AM
can this be done simply ? [email protected] Excel Discussion (Misc queries) 4 June 11th 06 01:23 PM


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

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

About Us

"It's about Microsoft Excel"