DaRedMonkey
IS-IT--Management
I have the following code snippet that list all file in a directory with ABC* pattern. But, it only list file in the directory that the VB script is in. How do I specify which directory to list. So, that it doesn't matter where the VB script resides.
Private Sub Command3_Click()
'Load an ini file into the textbox
CommonDialog1.DialogTitle = "Load KLARF file"
CommonDialog1.Filter = "klarf files (ABC.*)|ABC.*"
CommonDialog1.ShowOpen
If CommonDialog1.FileName = "" Then Exit Sub
Open CommonDialog1.FileName For Input As #1
RichTextBox1.Text = Input$(LOF(1), #1)
Close #1
End Sub