L
Len
Hi,
I tried to develop codes below and it prompts mismatch error message
Dim sPath As String
Dim k As Long
Dim myWB As Workbooks
Dim arrk
sPath = "D:\My Documents\P\Bank\CVB\"
arrk = Array("CVB Bank recon.xls", "GL.xls", "CVB.xls",
"GLformat.xls", "GL.unpchq.xls")
For k = 0 To UBound(arrk)
Set myWB = Nothing
Set myWB = Workbooks.Open(Filename:="D:\My Documents\P\Bank\CVB\"
& arrk(k))
If Err.Number = 0 Then
MsgBox "Workbook " & arrk(k) & " not found, process end "
Exit Sub
On Error GoTo 0
Else
Workbooks.Open Filename:="D:\Onglt Documents\HELP\Bank\RHB\" &
arrk(k)
End If
Next k
Any help will be appreciated and thanks in advance
Regards
Len
I tried to develop codes below and it prompts mismatch error message
Dim sPath As String
Dim k As Long
Dim myWB As Workbooks
Dim arrk
sPath = "D:\My Documents\P\Bank\CVB\"
arrk = Array("CVB Bank recon.xls", "GL.xls", "CVB.xls",
"GLformat.xls", "GL.unpchq.xls")
For k = 0 To UBound(arrk)
Set myWB = Nothing
Set myWB = Workbooks.Open(Filename:="D:\My Documents\P\Bank\CVB\"
& arrk(k))
If Err.Number = 0 Then
MsgBox "Workbook " & arrk(k) & " not found, process end "
Exit Sub
On Error GoTo 0
Else
Workbooks.Open Filename:="D:\Onglt Documents\HELP\Bank\RHB\" &
arrk(k)
End If
Next k
Any help will be appreciated and thanks in advance
Regards
Len