I have a macro that imports a file. I wish to code the following logic, how would I go about doing it?
If (blank workbook is open)
insert into blank workbook
else
new workbook
I can use the workbooks.add stmt to always open a new workbook, but i would prefer to import into workbook if it's open (only if there is no data in it).
thanks in advance.
If (blank workbook is open)
insert into blank workbook
else
new workbook
I can use the workbooks.add stmt to always open a new workbook, but i would prefer to import into workbook if it's open (only if there is no data in it).
thanks in advance.