I have written the code below that displays the file path in a msg box
but I want it to display in the user form. I have created a label to
hold the file path but I can not find the write code to make it
display.
My other problem is I am not sure where the code should go, behind the
label or do I just reference the label?
Could you give me some pointers.
Thanks
Pam
Private Sub CommandButton3_Click()
Dim fd As FileDialog
Set fd = Application.FileDialog(msoFileDialogFilePicker)
fd.InitialFileName = "\\ushou1fp003\wordp\Contracts\"
Dim vrtSelectedItem As Variant
With fd
If .Show = -1 Then
For Each vrtSelectedItem In .SelectedItems
MsgBox " " & vrtSelectedItem
'.Caption
Next vrtSelectedItem
Else
End If
End With
End Sub
Greg Maxey - 09 May 2006 12:50 GMT
What references do you have loaded to define FileDialog?
Me.Label1.Caption = fd ??