Detecting the workbook name on startup

  • Thread starter Thread starter bigmart
  • Start date Start date
B

bigmart

Hi,

I'm not sure this can be done but I need to detect when a new workbook
of a given name (X) is created on Excel startup. If it is not that
workbook I need to continue as normal. If it is, I need to open another
named spreadsheet (Y), take sheet1 from the 1st spreadsheet (X) and
insert it after the last sheet in the other workbook (Y) and close (X).
I've been tearing my hair out trying to detect the name of the
spreadsheet (X) as Excel opens and haven't got any further than that.
Please help!!!

thanks

Mart
 
I suspect there's a logical reason why you can't put workbook_open()
event code in the workbook you are trying to detect to do all the other
stuff... that would be easy


--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
www.nickhodge.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top