Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Detecting the workbook name on startup

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Detecting the workbook name on startup

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
DTHIS
www.nickhodge.co.uk


"bigmart" wrote in message
ups.com...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Detecting the workbook name on startup

If Nick's workbook suggestion does/can not work, may be :
http://www.cpearson.com/excel/AppEvent.htm

NickHK

"bigmart" wrote in message
ups.com...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Not detecting Open Workbook - Why Roger Excel Discussion (Misc queries) 7 January 26th 08 08:16 PM
Detecting if a Window/Workbook is Open Rob Excel Discussion (Misc queries) 5 July 10th 07 10:52 PM
Detecting if workbook running in IE or in Excel SkylineGTR Excel Programming 5 November 13th 05 01:20 AM
Detecting a another workbook has opended Nigel Excel Programming 1 May 7th 05 08:19 AM
Detecting workbook activation Jack Wolf Excel Programming 0 July 26th 03 01:10 AM


All times are GMT +1. The time now is 10:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"