Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Macro - isOpen function?

Status
Not open for further replies.

shinkley

IS-IT--Management
Jul 10, 2003
5
US
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.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top