working with 2 or vba's on the same sheet
thanx for your answer just what i wanted :-)
yes i think so, a2 is a dropdown list of websites, b2 activates the
hyperlink when i click on say google on the dropdown rather then clicking the
link on b2 i can hide b2 and the dropdown will jump to said website.
if there is a better way please feel free to let me know :-)
i know this is probably naughty but no one has answered my other question on
different post and i think you would know the answer.
(post) following a hyperlink.
i've seen the question on here and the answer but can't find it now, the
question is how do i follow how many times a hyperlink is activated?
(guessing its not possible for the external hyperlinks that i have set to
auto with the above vba) but i have seperate worksheet to worksheet
hyperlinks that i would like to monitor how many times they were activated.
(just to let you know before you tell me to add another vba! its on the same
worksheet so it will have to add to my already 2 vba's)
--
deejay
"Dave Peterson" wrote:
Maybe...
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim s As String
'always fit the columns
Application.EnableEvents = False
Me.Cells.EntireColumn.AutoFit
Application.EnableEvents = True
If Intersect(Me.Range("A2"), Target) Is Nothing Then
'do nothing
Else
s = Me.Range("B2").Value
Me.Parent.FollowHyperlink Address:=s
End If
End Sub
But did you really want to check to see if the changed cell was A2, but follow
the link in B2????
confused deejay wrote:
so how would i write this work_sheet change on one sheet?
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("A2"), Target) Is Nothing Then
Exit Sub
End If
Dim s As String
s = Range("B2").Value
ActiveWorkbook.FollowHyperlink Address:=s
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Cells.EntireColumn.AutoFit
Application.EnableEvents = True
End Sub
sorry i'm very new to vba actually new to excel too only know what i know
through reading posts on here
--
deejay
--
Dave Peterson
|