Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd like to list all open - but NOT hidden - workbooks in a userform listbox.
However, I am unable to find any properties that tell if a book is hidden or not. You can try to activate each book and test for success, I suppose, but there has to be a more elegant way than that. Isn't there? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Duke:
try, Private Sub UserForm_Initialize() Dim wbk As Workbook For Each wbk In Workbooks If wbk.Windows(1).Visible = True Then Me.ListBox1.AddItem wbk.Name End If Next End Sub -- 天行健,君*以自強不息 地勢坤,君*以厚德載物 http://www.vba.com.tw/plog/ "Duke Carey" wrote: I'd like to list all open - but NOT hidden - workbooks in a userform listbox. However, I am unable to find any properties that tell if a book is hidden or not. You can try to activate each book and test for success, I suppose, but there has to be a more elegant way than that. Isn't there? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Much simpler, and very effective. Thanks
"chijanzen" wrote: Duke: try, Private Sub UserForm_Initialize() Dim wbk As Workbook For Each wbk In Workbooks If wbk.Windows(1).Visible = True Then Me.ListBox1.AddItem wbk.Name End If Next End Sub -- 天行健,君*以自強不息 地勢坤,君*以厚德載物 http://www.vba.com.tw/plog/ "Duke Carey" wrote: I'd like to list all open - but NOT hidden - workbooks in a userform listbox. However, I am unable to find any properties that tell if a book is hidden or not. You can try to activate each book and test for success, I suppose, but there has to be a more elegant way than that. Isn't there? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Duke,
For Each WkBk in Workbooks If WkBk.Windows(1).Visible Then '- - - - Next Regards, Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Duke Carey" wrote in message ... I'd like to list all open - but NOT hidden - workbooks in a userform listbox. However, I am unable to find any properties that tell if a book is hidden or not. You can try to activate each book and test for success, I suppose, but there has to be a more elegant way than that. Isn't there? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Exclude Hidden Row Values | Excel Worksheet Functions | |||
Copy Worksheet and Exclude Hidden fields | Excel Worksheet Functions | |||
Exclude data from summary totals when hidden | Excel Worksheet Functions | |||
Is there a way to exclude hidden rows/columns when printing a doc | Setting up and Configuration of Excel | |||
Exclude hidden data from summary totals | Excel Discussion (Misc queries) |