How to test success of a "Set" command?
Thanks Jim
Jim Thomlinson wrote:
Your code has me at a bit of a loss so here is a generallized method...
dim wbkOpen as workbook
on error resume next
set wbkOpen = workbooks("MyBook.xls")
on error goto 0
is wbkOpen is nothing then _
set wbkOpen = Workbooks.Open("C:\Mybook.xls")
'Note that Nothing is the test for an object being initialized
|