Subscript out of range Error
I have a VBA that is :
set WH = workbook("file1"). file1 is an open excel workbook.
It works fine mostly but on 1 of my colleagues' PC, it gives "subscription
out of range".
We were told to change the line to :
set WH = workbook("file1.xls") with the xls extension and it now works fine.
How can we get VBA to accept both file1 and file1.xls as valid input?
Thanks.
|