Jumat, 01 Februari 2019

Re: [MS_AccessPros] Displaying file names of a specific folder in a list box, and running the selected file afterwards.

 

Kevin,
I expect code like the following should work depending on the names of your controls and properties of your list box:

Private Sub cmdFillLbo_Click()
    Dim strFiles As String
    Dim strFile As String
    Dim strFolder As String
    strFolder = Me.txtFolderName & "\"
    strFile = Dir(strFolder)
    strFiles = strFile
    Do Until Len(strFile) = 0
        strFile = Dir()
        strFiles = strFiles & ";" & strFile
    Loop
    Me.lboFileNames.RowSource = strFiles
End Sub

Private Sub lboFileNames_DblClick(Cancel As Integer)
    Dim strFile As String
    strFile = Me.txtFolderName & "\" & Me.lboFileNames
    FollowHyperlink strFile
End Sub

Duane


From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of Qingqing qingqinga@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Friday, February 1, 2019 11:14 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Displaying file names of a specific folder in a list box, and running the selected file afterwards.
 
Dear All,
Is it possible to display file names of a specific folder in a list box on a form?  and afterwards double click on a selected file name to open it? Thanks.
Best Regards,
Kevin



------------------------------------
Posted by: Qingqing <qingqinga@yahoo.com>
------------------------------------


------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/MS_Access_Professionals/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/MS_Access_Professionals/join
    (Yahoo! ID required)

<*> To change settings via email:
    MS_Access_Professionals-digest@yahoogroups.com
    MS_Access_Professionals-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    MS_Access_Professionals-unsubscribe@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/

__._,_.___

Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


SPONSORED LINKS
.

__,_._,___

Tidak ada komentar:

Posting Komentar