Using Drive,Dir and File I can tunnel down to the files I want. I need to be able to print out all the names of the files with in the folder as they are displayed on the FILE1 control, at the click of a button.
Any ideas guys?
Printable View
Using Drive,Dir and File I can tunnel down to the files I want. I need to be able to print out all the names of the files with in the folder as they are displayed on the FILE1 control, at the click of a button.
Any ideas guys?
VB Code:
Private Sub Command1_Click() Dim x As Integer For x = 0 To File1.ListCount - 1 Printer.Print File1.List(x) Next Printer.EndDoc End Sub
VB Code:
Dim FileName1 Private Sub Form_Load() 'FileName1 = App.Path & "\SoftwareFiles" 'You Can use ur Path Set Fs = CreateObject("Scripting.FileSystemObject") Set Fs = New FileSystemObject FileName1 = "C:\Program Files\Address Book\Image" 'Image is folder Name In Address Book Folder Set f = Fs.GetFolder(FileName1) Set fc = f.Files For Each f1 In fc s1 = s1 & f1.Name MsgBox s1 Next End Sub
Perfect! Thanks!