View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Brian Matlack[_57_] Brian Matlack[_57_] is offline
external usenet poster
 
Posts: 1
Default Checking for workbooks


Ron de Bruin Wrote:
Hi Brian

Note:

Workbooks.Count
This count also hidden workbooks(personal.xls)

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Norman Jones" wrote in messag
...
Hi Brian,

Try:

If Not Workbooks.Count = 2 Then
'your warning
Exit Sub
End if


---
Regards,
Norman


"Brian Matlack

wrote i
message
news:Brian.Matlack.22ys4a_1139492101.8355@excelfor um-nospam.com...

Hi!
I would like to write code that checks to see how many workbooks
(windows) are open on this application. Can someone help me?
I have code that goes to the next active window and copies

specified
range. If there is no other workbook open or if there is more tha

1
other workbook open then I want to display a message box tha

instructs
the user and stops the macro.
Thanks for your time!


--
Brian Matlack


------------------------------------------------------------------------
Brian Matlack's Profile

http://www.excelforum.com/member.php...fo&userid=3508
View this thread

http://www.excelforum.com/showthread...hreadid=510541



Works Great!! Thanks!

--
Brian Matlac
-----------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...nfo&userid=350
View this thread: http://www.excelforum.com/showthread.php?threadid=51054