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

Thank you Jim. Your code worked well as well. Now I will work on my code
based on your coding techniques.

"Jim Thomlinson":

You must first select the sheet and then you can select the range. You can
not do it all in one shot. Something like this...

Private Sub Button124_Click()
Dim strAddress As String

strAddress = Range("Q5").Value
Sheets(Replace(Left(strAddress, InStr(strAddress, "!") - 1), "'",
"")).Select
ActiveSheet.Range(Trim(Mid(strAddress, InStr(strAddress, "!") + 1,
256))).Select
End Sub
--
HTH...

Jim Thomlinson


"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