E
Eli the Iceman
greetings,
I am tryihg to get FileDialog to work, I know about the ASP fie, but I
prefer to use the File Dialog as all I need is to paste a folder link in a
table via a form control. I got Filedialog to work, but am running into an
issue. My control on the form is a hyperlink, so if you paste the file path
or type it in, you can then click on the link and it will open a new window
of the path. However, when I select the path via FileDialog, it still shows
as a link, but will not follow it. Any suggestions? Code is below: Thanks,
Public Function PickFolder() As String
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
Dim vrtSelectedItem As Variant
With fd
If .Show = -1 Then
For Each vrtSelectedItem In .SelectedItems
Screen.ActiveControl = vrtSelectedItem
Next vrtSelectedItem
Else
End If
End With
Set fd = Nothing
End Function
I am tryihg to get FileDialog to work, I know about the ASP fie, but I
prefer to use the File Dialog as all I need is to paste a folder link in a
table via a form control. I got Filedialog to work, but am running into an
issue. My control on the form is a hyperlink, so if you paste the file path
or type it in, you can then click on the link and it will open a new window
of the path. However, when I select the path via FileDialog, it still shows
as a link, but will not follow it. Any suggestions? Code is below: Thanks,
Public Function PickFolder() As String
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFolderPicker)
Dim vrtSelectedItem As Variant
With fd
If .Show = -1 Then
For Each vrtSelectedItem In .SelectedItems
Screen.ActiveControl = vrtSelectedItem
Next vrtSelectedItem
Else
End If
End With
Set fd = Nothing
End Function