gunny2k9
06-21-2011, 05:54 AM
With this code i need to find the best way to Move files to a sub folder ...
Dim xFile As Integer
Dim Filename As Variant
With Application
' Set File Name Array to selected Files (allow multiple)
Filename = .GetOpenFilename(Filter, FilterIndex, Title, , True)
End With
' Exit on Cancel
If Not IsArray(Filename) Then
MsgBox "No file was selected."
Exit Sub
End If
' Open Files
For xFile = LBound(Filename) To UBound(Filename)
msg = msg & Filename(xFile) & vbCrLf ' This can be removed
Workbooks.Open Filename(xFile)
xName = Right(Filename(xFile), 14)
Call Interigate
Next xFile
I E once it has opened, processed and closed each document it needs to move said file/files to say a sub folder where the file is to like a Done folder#
any one have any ideas? would prefer a simple bit of code but any that works be good
Dim xFile As Integer
Dim Filename As Variant
With Application
' Set File Name Array to selected Files (allow multiple)
Filename = .GetOpenFilename(Filter, FilterIndex, Title, , True)
End With
' Exit on Cancel
If Not IsArray(Filename) Then
MsgBox "No file was selected."
Exit Sub
End If
' Open Files
For xFile = LBound(Filename) To UBound(Filename)
msg = msg & Filename(xFile) & vbCrLf ' This can be removed
Workbooks.Open Filename(xFile)
xName = Right(Filename(xFile), 14)
Call Interigate
Next xFile
I E once it has opened, processed and closed each document it needs to move said file/files to say a sub folder where the file is to like a Done folder#
any one have any ideas? would prefer a simple bit of code but any that works be good