I would like to make a value I have put in a cell to be a hypertext

jloyzaga

Board Regular
Joined
Mar 19, 2008
Messages
80
Code:
[COLOR=#000000][FONT=Verdana]the code is below and the line is highlighted [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]Set objSheet = oEngine.Sheets("Test_Results") [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]        oEngine.Sheets("Test_Results").Select [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]        With objSheet [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]             [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]            'Enter the Result [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]            If NewTC Then [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]                .Range("A" & Row & ":E" & Row).Interior.ColorIndex = 15 [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]                .Range("A" & Row & ":E" & Row).Merge [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]                Row = Row + 1 [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]                .Range("A" & Row & ":E" & Row).Merge         [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]                .Range("A" & Row).Value = TestcaseName [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]                'Set color and Fonts for the Header [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]                .Range("A" & Row & ":E" & Row).Interior.ColorIndex = 19 [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]                .Range("A" & Row & ":E" & Row).Font.ColorIndex = 53 [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]                .Range("A" & Row & ":E" & Row).Font.Bold = True [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]                Row = Row + 1 [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]            End If [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]            .Range("A" & Row).Value = sStepName [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]            'oEngine.Selection.ShapeRange.ScaleWidth 1.72, msoFalse, msoScaleFromTopLeft [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]            'oEngine.Selection.ShapeRange.ScaleHeight 1.81, msoFalse, msoScaleFromTopLeft [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]             [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]            .Range("B" & Row).Value = sStatus [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]            .Range("B" & Row).Font.Bold = True                     [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]             [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]            Select Case sStatus [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]                Case "Pass" [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]                    .Range("B" & Row).Font.ColorIndex = 50 [/FONT][/COLOR]

[COLOR=#000000][FONT=Verdana]                Case "Fail" [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]                    .Range("A" & Row & ":F" & Row).Font.ColorIndex = 3 [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]                 [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]                    .Range("F" & Row).Value = screenshotname [/FONT][/COLOR]

[COLOR=#000000][FONT=Verdana]                Case "Warning" [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]                    .Range("A" & Row & ":E" & Row).Font.ColorIndex = 46 [/FONT][/COLOR]

[COLOR=#000000][FONT=Verdana]            End Select [/FONT][/COLOR]

[COLOR=#000000][FONT=Verdana]            .Range("B" & Row).Font.Bold = True [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]            .Range("C" & Row).Value = sExpected [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]            .Range("D" & Row).Value = sActual [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]            .Range("E" & Row).Value = sDetails [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]            .Range("F" & Row).Value = Time [/FONT][/COLOR]
[COLOR=#000000][FONT=Verdana]           [/FONT][/COLOR][COLOR=#FF0000][FONT=Verdana][I][B] .Range("G" & (Row)).Value = fullfilename[/style] [/B][/I]
             
             

             
[COLOR=#000000]            'Set the Borders [/style] 
            .Range("A" & Row & ":E" & Row).Borders(1).LineStyle = 1 [/style] 
            .Range("A" & Row & ":E" & Row).Borders(2).LineStyle = 1 [/style] 
            .Range("A" & Row & ":E" & Row).Borders(3).LineStyle = 1 [/style] 
            .Range("A" & Row & ":E" & Row).Borders(4).LineStyle = 1 [/style] 
            .Range("A" & Row & ":E" & Row).VerticalAlignment = -4160 [/style] 
     
        End With [/style] 
         
         
        oEngine.Sheets("Test_Summary").Select [/style] 
        oEngine.Sheets("Test_Summary").Range("B1").Select [/style] 
        'Save the Workbook [/style] 
        objWorkBook.Save [/style] 
[/style] [/COLOR][/FONT][/COLOR]
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Try:

Code:
ActiveSheet.Hyperlinks.Add Anchor:=Range("G" & (Row)), Address:=fullfilename, TextToDisplay:=fullfilename
 
Last edited:
Upvote 0
I guess you should add the code as an additional line just below your highlighted code.
 
Upvote 0

Forum statistics

Threads
1,203,502
Messages
6,055,772
Members
444,822
Latest member
Hombre

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