I have the following hyperlink in sheet named 'Process' in cell B34:
Text to Display: CLICK HERE TO PERFORM THE FOLLOWING:
Type the cell reference: B34
The macro code is:
Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink)
If Target.Range.Address = "$B$34" Then
Worksheets("Input Sheet").Select
Columns("C:C").Select
Selection.Replace What:="PLASTIC", Replacement:="PLASTIC/POLYMER", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("C:C").Select
Selection.Replace What:="POLYMER", Replacement:="PLASTIC/POLYMER", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("C:C").Select
Selection.Replace What:="AGGREGATE", Replacement:="AGGREGATES/HARDCORE", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("C:C").Select
Selection.Replace What:="AGGREGATES", Replacement:="AGGREGATES/HARDCORE", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("C:C").Select
Selection.Replace What:="HARDCORE", Replacement:="AGGREGATES/HARDCORE", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("C:C").Select
Selection.Replace What:="NON DOMESTIC", Replacement:="OTHER", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("A1").Select
End If
End Sub
When I click on the hyperlink, nothing happens.
I have tried running the following code in the immediate window:
Application.EnableEvents = True
But still nothing happens when I click the hyperlink.
Any ideas?
Text to Display: CLICK HERE TO PERFORM THE FOLLOWING:
Type the cell reference: B34
The macro code is:
Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink)
If Target.Range.Address = "$B$34" Then
Worksheets("Input Sheet").Select
Columns("C:C").Select
Selection.Replace What:="PLASTIC", Replacement:="PLASTIC/POLYMER", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("C:C").Select
Selection.Replace What:="POLYMER", Replacement:="PLASTIC/POLYMER", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("C:C").Select
Selection.Replace What:="AGGREGATE", Replacement:="AGGREGATES/HARDCORE", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("C:C").Select
Selection.Replace What:="AGGREGATES", Replacement:="AGGREGATES/HARDCORE", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("C:C").Select
Selection.Replace What:="HARDCORE", Replacement:="AGGREGATES/HARDCORE", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Columns("C:C").Select
Selection.Replace What:="NON DOMESTIC", Replacement:="OTHER", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("A1").Select
End If
End Sub
When I click on the hyperlink, nothing happens.
I have tried running the following code in the immediate window:
Application.EnableEvents = True
But still nothing happens when I click the hyperlink.
Any ideas?