How can you set a column of cells to be hyperlinks?

J

Jim Moberg

Hi,

I'm trying to set a column of cell values to be hyperlinks so that when
clicked on a web page will open showing the information for the paricular
order selected from the spreadsheet.

What I have done so far is to insert a column next to the column that has
the data in it and use the HYPERLINK function with reference to the cell to
the left. That works just fine but now I want to get rid of the column to
the left and leave just the column with the hyperlnks in it. If I remove the
column then the cell reference is bad because the cells have been removed.

What can I do to get this to work?
 
D

Don Guillett

Why not just use a double_click event on the original data instead. From my
menu page

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
Application.DisplayAlerts = False
Dim WantedSheet As String
WantedSheet = Trim(ActiveCell.Value)
If WantedSheet = "" Then Exit Sub
On Error Resume Next
If Sheets(ActiveCell.Value) Is Nothing Then
GetWorkbook ' calls another macro to do that
Else
Sheets(ActiveCell.Value).Select
ActiveSheet.Range("a4").Select
End If
Application.DisplayAlerts = True
End Sub
 
P

Pete_UK

You can fix the values in your column with the formulae in - highlight
all the cells and click <copy>, then Edit | Paste Special | Values
(check) | OK then <Esc>. You can then remove the first column.

Hope this helps.

Pete
 
D

Don Guillett

right click sheet tab>view code>copy/paste the macro>type something in a
cell and double click on it. For instance, type in a sheet name and then
double click on the sheet name
 
J

Jim Moberg

Hi Pete,

I tried this and it didn't work for me. The value was pasted but the value
was then not a link.
 
Top