View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Code assistance please

just change the font after you create the hyperlink:

Sub tester9()
Set ws = ActiveSheet
With ws
.[a1] = Sheets(1).Name
.[a1].Hyperlinks.Add _
Anchor:=.Cells(1, 1), _
Address:="", _
SubAddress:="'" & Sheets(1).Name & "'!A1"
.[a1].Font.ColorIndex = 2 '<<< *******

End With

End Sub


--
Regards,
Tom Ogilvy


"JMay" wrote in message
news:iIk_c.38375$wu.7190@okepread04...
Down Within a given code block I have:

With ws
.[a1] = Sheets(1).Name
.[a1].Font.ColorIndex = 2 '<<< *******
.[a1].Hyperlinks.Add _
Anchor:=.Cells(1, 1), _
Address:="", _
SubAddress:="'" & Sheets(1).Name & "'!A1"
End With

Note line 3 '<<< ******* where I'm trying to "White-Out" the hyperlink

text
(make invisible) from showing,
Yet after running code the text in a1 is still blue and visible,, -- how

can
I achieve my goal?


TIA,