View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
PalyanJoe PalyanJoe is offline
external usenet poster
 
Posts: 4
Default Button-click to jump another sheet

I'm very lucky, my programming god helped me. You are the guru, Tom.
Your code did what I want. Thank you very much.

"Tom Ogilvy":

Sub Button124_Click()
Dim a as String, rng as Range
a = Range("Q5").Value
set rng = Application.Evaluate(a)
Application.Goto rng, True
End Sub

--
Regards,
Tom Ogilvy

"PalyanJoe" wrote:

Hi,
I reviewed all of the related subjects but could not achieve to solve my
link problem. My problem is,
I have a cell Q5 on the master sheet, that calculates a link string. Its
value changes based on my selections in the sheet. For ref. let's assume the
value in Q5 is "Alisan!$H$2" without double-quotes.
I've created a button to use jumping to the sheet-cell that is determined by
the Q5 value. But neither .Activate, nor .FollowHyperlink rows below
worked. Can somebody help me and tell me where I fail?

Sub Button124_Click()
a = Range("Q5").Value
Range(a).Activate
'or ActiveWorkbook.FollowHyperlink Address:=a, NewWindow:=False
End Sub