ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   automatically assign a hyperlink to a cell (https://www.excelbanter.com/excel-programming/365255-automatically-assign-hyperlink-cell.html)

Brad J.[_4_]

automatically assign a hyperlink to a cell
 

I have a database in which I am storing information and assigning a ID
number to each entry. From those entries, a report is generated and
saved to a designated directory on my server. I would like to somehow
automatically assign a hyperlink to that forms ID number in the
database so that anyone can simply click on the hyperlink and pull up
the form.

Basically I need to do a find last row command and place the hyperlink
in the ID number cell. The hyperlinks will always go to the same
directory, but the variable would obviously be the form ID number.

Is there a way to do this or even if I have to place a hyperlink in
each cell using a directory reference from another cell would work,
but I am having trouble with the variable working.

Thanks for any advice,
Brad


--
Brad J.
------------------------------------------------------------------------
Brad J.'s Profile: http://www.excelforum.com/member.php...o&userid=21713
View this thread: http://www.excelforum.com/showthread...hreadid=555180


Don Guillett

automatically assign a hyperlink to a cell
 
Instead of a hyperlink why not just use a double click event in the sheet
module. Right click sheet tabview codeinsert this. This example uses a
typed name of a worksheet to goto to it.

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
--
Don Guillett
SalesAid Software

"Brad J." wrote in
message ...

I have a database in which I am storing information and assigning a ID
number to each entry. From those entries, a report is generated and
saved to a designated directory on my server. I would like to somehow
automatically assign a hyperlink to that forms ID number in the
database so that anyone can simply click on the hyperlink and pull up
the form.

Basically I need to do a find last row command and place the hyperlink
in the ID number cell. The hyperlinks will always go to the same
directory, but the variable would obviously be the form ID number.

Is there a way to do this or even if I have to place a hyperlink in
each cell using a directory reference from another cell would work,
but I am having trouble with the variable working.

Thanks for any advice,
Brad


--
Brad J.
------------------------------------------------------------------------
Brad J.'s Profile:
http://www.excelforum.com/member.php...o&userid=21713
View this thread: http://www.excelforum.com/showthread...hreadid=555180





All times are GMT +1. The time now is 08:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com