PC Review


Reply
Thread Tools Rate Thread

Detecting the workbook name on startup

 
 
bigmart
Guest
Posts: n/a
 
      19th Dec 2006
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

 
Reply With Quote
 
 
 
 
Nick Hodge
Guest
Posts: n/a
 
      19th Dec 2006
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 Removed)DTHIS
www.nickhodge.co.uk


"bigmart" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>


 
Reply With Quote
 
NickHK
Guest
Posts: n/a
 
      20th Dec 2006
If Nick's workbook suggestion does/can not work, may be :
http://www.cpearson.com/excel/AppEvent.htm

NickHK

"bigmart" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
detecting a proteced workbook Fan924 Microsoft Excel Programming 4 10th Dec 2008 09:49 AM
Not detecting Open Workbook - Why Roger Microsoft Excel Misc 7 26th Jan 2008 08:16 PM
Detecting open workbook =?Utf-8?B?TmlnZWwgUlM=?= Microsoft Excel Programming 2 13th Sep 2007 07:28 AM
Detecting a another workbook has opended Nigel Microsoft Excel Programming 1 7th May 2005 08:19 AM
Detecting workbook activation Jack Wolf Microsoft Excel Programming 0 26th Jul 2003 01:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:49 AM.