View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
kartune85[_5_] kartune85[_5_] is offline
external usenet poster
 
Posts: 1
Default Test for open workbook


Thanks for the advice NickHK.

Altho I've still got a slight problem with that I've used
"ThisWorkbook" but from my code I've created a second workbook which is
automatically named "Book1, Book2, Book3..." and I've got code in
"ThisWorkbook" that moves a sheet from itself to the newly created
workbook.

There's a conflict when someone tries to start a new Workbook while
another one is still open and then "ThisWorkbook" tries to move a sheet
from itself to "Workbooks(2)". Thus the confusion cause I think it gets
confused as to which one is "Workbooks(2)" (Book1 or OldBook).

How can I refer to the newly created workbook without it getting
confused with other workbooks that are already opened?

If there is some kind of testing procedure to stop the workbook from
opening if there's others open would come in quite handy.

Kartune85


--
kartune85
------------------------------------------------------------------------
kartune85's Profile: http://www.excelforum.com/member.php...o&userid=35586
View this thread: http://www.excelforum.com/showthread...hreadid=554374