[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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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.
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,047
Members
449,064
Latest member
scottdog129

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
Back
Top