remco77a
01-31-2020, 06:49 AM
Hi there,
Hopefully someone can help me, since recently I am working on VBA and have been looking for a solution for saving a hyperlink for a week.
I will explain what I am doing, I have created a user form where a file from the server is stored in a text box using a file path.
When I save the userform then all data is sent correctly to my data base. but unfortunately the file path is not recognized as a hyperlink but as text value.
My question is actually how can i save my file path as a hyperlink in my excel file in one way?
I use this code to browse to my file:
Private Sub CmdFoto_Click()
'BROWSE FOR FILE
Dim FileName As String
FileName = Application.GetOpenFilename()
txtFoto.Value = FileName
txtFoto.SetFocus
End Sub
For save the hyperlink to my excel file in column "k" I use this:
.Range("K" & iRow).Value = frmNew.txtFoto.Value
Hopefully someone can help me, since recently I am working on VBA and have been looking for a solution for saving a hyperlink for a week.
I will explain what I am doing, I have created a user form where a file from the server is stored in a text box using a file path.
When I save the userform then all data is sent correctly to my data base. but unfortunately the file path is not recognized as a hyperlink but as text value.
My question is actually how can i save my file path as a hyperlink in my excel file in one way?
I use this code to browse to my file:
Private Sub CmdFoto_Click()
'BROWSE FOR FILE
Dim FileName As String
FileName = Application.GetOpenFilename()
txtFoto.Value = FileName
txtFoto.SetFocus
End Sub
For save the hyperlink to my excel file in column "k" I use this:
.Range("K" & iRow).Value = frmNew.txtFoto.Value