JakeVBA2009
New Member
- Joined
- Nov 30, 2009
- Messages
- 16
Hi guys, I need to write an IFError Function that closely mimics the Excel 2007 IFError Function.
(It does not need to consider the case of the function being used as part of an array formula)
I've got this code, but feel like i'm barking up the wrong tree completely...
Thanks in advance.
Sub openVBADocument()
Dim strFolder As String
Dim strVBADocument As String
strFolder = Range("Folder")
strVBADocument = Range("VBADocument")
If Dir("VBA Document" & strFolder & "\" & strVBADocument & ".xls") = "" Then
MsgBox "Error", vbExclamation
Else
Workbooks.Open Filename:="VBA Document" & strFolder & "\" & strVBADocument & ".xls"
End If
End Sub
(It does not need to consider the case of the function being used as part of an array formula)
I've got this code, but feel like i'm barking up the wrong tree completely...
Thanks in advance.
Sub openVBADocument()
Dim strFolder As String
Dim strVBADocument As String
strFolder = Range("Folder")
strVBADocument = Range("VBADocument")
If Dir("VBA Document" & strFolder & "\" & strVBADocument & ".xls") = "" Then
MsgBox "Error", vbExclamation
Else
Workbooks.Open Filename:="VBA Document" & strFolder & "\" & strVBADocument & ".xls"
End If
End Sub