Hello, can you assist me with this? I am not a programmer and have created a simple dropdown that user are selecting, according to their selection on dropdown, system check on their c:\ drive and populate to the (list Box) all documents in that folder. Then user can select the document that are interested to view.
Everything is working well but the problem is, it will also show additional hidden files which was removed from the folder. Its mark it as (~$). How can I hide those documents, so List Box does not pick it up?
Thank you very much!

Private Sub ListDoc_Click()
Dim db As Database
Dim RS As Recordset
Dim sQryString As String
Dim iSelectedRow
On Error GoTo ErrorHandler
iSelectedRow = ListDoc.ListIndex
sMyDoc = ListDoc.Column(0, iSelectedRow)
sProduct = Right(sMyDoc, Len(sMyDoc) - InStrRev(sMyDoc, "."))
Application.FollowHyperlink sMyDoc
ExitHandler: 'clean up as necessary and exit
Set RS = Nothing 'These two lines are just an example
Set db = Nothing 'your code may not include them
Exit Sub
ErrorHandler:
Select Case Err 'specific Case statements for errors we can anticipate, the "Else" catches any others
Case 2501 'Action OpenReport was cancelled.
MsgBox "No data to display"
DoCmd.Hourglass False
Resume ExitHandler
Case Else
MsgBox Err.Description
DoCmd.Hourglass False
Resume ExitHandler
End Select
End Sub
Private Sub ListFolders_Change()
Dim iSelectedRow
txtFolderSearch.Enabled = True
txtGlobalSearch.Value = ""
iSelectedRow = ListFolders.ListIndex
sFolder = ListFolders.Column(0, iSelectedRow) & "\"
GetListFolders FileSystem.GetFolder(sSelectDrive & "\" & sFolder)
ListDoc.Enabled = True
ListDoc.Visible = True
End Sub
Private Sub ListFolders_Click()
Dim iSelectedRow
ListDoc.RowSource = ""
iSelectedRow = ListFolders.ListIndex
sDrive = ListFolders.Column(0, iSelectedRow) & "\"
End Sub
Thank you for getting back with me! I am not a programmer and not sure how to do that. Any idea how to add that to my current code? Thanks