gunny2k9
06-13-2011, 06:36 AM
Ok i know ther is code easily found on google but the examples work on 1 file .. i need to open many and thats done with
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
any one got any ideas how i can easly check if file is open or not ? ..
PS the file/files are on a Network Drive hence the need to check if there open, as it may be opened be some one else where
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
any one got any ideas how i can easly check if file is open or not ? ..
PS the file/files are on a Network Drive hence the need to check if there open, as it may be opened be some one else where