Excel VBA Hyperlinks - Whole sheet hyperlinked not just one column

BirdyB

New Member
Joined
Apr 15, 2016
Messages
2
Hi All,

Hope you can help i have the following code which when you click a customer's number in column A, starting with row 3, will link to another sheet within the same workbook to show just their details from their row. There are 35 columns in total. The code works, however, the whole sheet appears to be hyperlinked, although column A is the only one one in blue and underlined. The rest of the text from column B to AI shouldn't be linked.

Code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim NUM As String
Dim CustomerList As Integer, CustomerCount As Integer, CustomerDataCheck As Integer
Dim lastRow As Long


CustomerList = 3
CustomerCount = Sheet3.Range("A515").Value
For CustomerDataCheck = CustomerList To CustomerCount + 10

With Me
.Cells(CustomerList, 1).Hyperlinks.Add Anchor:=Cells(CustomerList, 1), Address:="", SubAddress:=Cells(CustomerList, 1).Address, ScreenTip:="Click here to view customer summary.", TextToDisplay:=Cells(CustomerList, 1).Value
.Select
End With


CustomerList = 3 + 1
Next CustomerDataCheck



NUM = Selection.Value
If NUM <> vbNullString Then
Sheet2.Range("Z8").Value = NUM
Sheet2.Range("T6").Value = Sheet2.Range("Z9").Value
Sheet2.Activate
Sheet2.Range("D2").Select

End If


End Sub

Thank you for your help in advance.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,224,820
Messages
6,181,154
Members
453,021
Latest member
Justyna P

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