Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / May 2006

Tip: Looking for answers? Try searching our database.

Return a File Path to a label on the user form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pam - 09 May 2006 12:36 GMT
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   ??

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.