P
Pete
New to this group so Hi to you all, Im after some help as Im new to
VBA/code and its adictive.
Im after help finishing the code below off, I would like to add a
commandbutton to allow the selected files to be deleted from the target
folder.
Private Sub CommandButton1_Click()
activeDir = "C:\my path"
documents.Open (activeDir & "\" & ListBox1.Value)
RAOPEN.hide
End Sub
Private Sub ListBox1_Click()
End Sub
Private Sub UserForm_Initialize()
Dim objFSO As Object, TargetFolder As Object, FC As Object
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set TargetFolder = objFSO.GetFolder("C:\my path")
Set FC = TargetFolder.Files
HowMany = FC.Count
For Each File In FC
ListBox1.AddItem (File.Name)
Debug.Print File.Name
Next File
End Sub
Regards
Pete
VBA/code and its adictive.
Im after help finishing the code below off, I would like to add a
commandbutton to allow the selected files to be deleted from the target
folder.
Private Sub CommandButton1_Click()
activeDir = "C:\my path"
documents.Open (activeDir & "\" & ListBox1.Value)
RAOPEN.hide
End Sub
Private Sub ListBox1_Click()
End Sub
Private Sub UserForm_Initialize()
Dim objFSO As Object, TargetFolder As Object, FC As Object
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set TargetFolder = objFSO.GetFolder("C:\my path")
Set FC = TargetFolder.Files
HowMany = FC.Count
For Each File In FC
ListBox1.AddItem (File.Name)
Debug.Print File.Name
Next File
End Sub
Regards
Pete