ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Phantom Of The Open workbook. (https://www.excelbanter.com/excel-programming/336839-re-phantom-open-workbook.html)

STEVE BELL

Phantom Of The Open workbook.
 
Vasant,

Thank you!

--
steveB

Remove "AYN" from email to respond
"Vasant Nanavati" <vasantn AT aol DOT com wrote in message
...
I think this works:

Function lngCount() As Long
Dim wb As Workbook
For Each wb In Workbooks
If wb.Windows(1).Visible Then lngCount = lngCount + 1
Next
End Function

--

Vasant




"STEVE BELL" wrote in message
news:iSaKe.8001$7d.1545@trnddc08...
You might be correct... You are more familiar and adapt then myself!

So I am curious now - how would you do it?
That is count the number of unhidden workbooks open in a single session
of
Excel...

Thanks...
--
steveB

Remove "AYN" from email to respond
"keepITcool" wrote in message
. com...

a workbook can have multiple windows (visible and/or hidden)
thus the count of the visible windows is meaningless
insofar as it has no relation to the number of workbooks.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


STEVE BELL wrote :

Sounded like he was looking to see how many visible workbooks were
opened. My code seemed to do that.

Correct me if I'm wrong, please...








Vasant Nanavati

Phantom Of The Open workbook.
 
You're welcome, Steve!

Regards,

Vasant

"STEVE BELL" wrote in message
news:JzbKe.8319$7d.2679@trnddc08...
Vasant,

Thank you!

--
steveB

Remove "AYN" from email to respond
"Vasant Nanavati" <vasantn AT aol DOT com wrote in message
...
I think this works:

Function lngCount() As Long
Dim wb As Workbook
For Each wb In Workbooks
If wb.Windows(1).Visible Then lngCount = lngCount + 1
Next
End Function

--

Vasant




"STEVE BELL" wrote in message
news:iSaKe.8001$7d.1545@trnddc08...
You might be correct... You are more familiar and adapt then myself!

So I am curious now - how would you do it?
That is count the number of unhidden workbooks open in a single session
of
Excel...

Thanks...
--
steveB

Remove "AYN" from email to respond
"keepITcool" wrote in message
. com...

a workbook can have multiple windows (visible and/or hidden)
thus the count of the visible windows is meaningless
insofar as it has no relation to the number of workbooks.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


STEVE BELL wrote :

Sounded like he was looking to see how many visible workbooks were
opened. My code seemed to do that.

Correct me if I'm wrong, please...










All times are GMT +1. The time now is 04:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com