[Excel] Hyperlink Question

qiqinuinaifen128

Board Regular
Joined
Dec 26, 2008
Messages
65
Dear Pros,

Hi, I am a beginner. I found an question again. Hope can get help again.

I have a button in one of my worksheet. and i have assigned an macro to this button. Below is the Code
Code:
Sheets("My Sheet").Select
<!-- BEGIN TEMPLATE: bbcode_code --> This button is just a simple function to select another sheet.
If i want to create a same function like this macro, but i would like the user to click the cell which contain certain words. Do you think it is possible?
Can i use Hyperlink?

Hope to hear from you soon ^^. Thank you in advance
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Perhaps this. Make a list of the sheet names in column A, then right click the sheet tab, select View Code and paste in

Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column = 1 Then
    Cancel = True
    On Error Resume Next
    Sheets(Target.Value).Select
    On Error GoTo 0
End If
End Sub

Now double-click a sheet name to select that sheet.
 

qiqinuinaifen128

Board Regular
Joined
Dec 26, 2008
Messages
65
Hi,

Thank you for your prompt reply. It's work. How about if i want to put all the sheet name at Column O row number 2?

Hope to hear from you soon
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Hi,

Thank you for your prompt reply. It's work. How about if i want to put all the sheet name at Column O row number 2?

Hope to hear from you soon


Sorry I'm not clear what you mean. Do you mean

sheet names in O2, O3 and so on

or sheet names in O2, P2 and so on
 

qiqinuinaifen128

Board Regular
Joined
Dec 26, 2008
Messages
65

ADVERTISEMENT

Sorry.

Because the example you give me is i need to key in all the sheet name on column A right?
How about if i want to put all the sheet name on Column 0 and start at Row number 2
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Try this

Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column = 15 And Target.Row > 1 Then
    Cancel = True
    On Error Resume Next
    Sheets(Target.Value).Select
    On Error GoTo 0
End If
End Sub
 

qiqinuinaifen128

Board Regular
Joined
Dec 26, 2008
Messages
65
Hi,

Thank you very much for your code. I trial and error and got the answer i want

Since column 0 is 15 so i change the code to

Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Column = 15 Then
    Cancel = True
    On Error Resume Next
    Sheets(Target.Value).Select
    On Error GoTo 0
End If
End Sub
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,653
Messages
5,854,963
Members
431,689
Latest member
jacker01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top