ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find active Windows() (https://www.excelbanter.com/excel-programming/281485-find-active-windows.html)

Lieven

Find active Windows()
 
Hi,

I would like to find out, how I can find which excelform
is open?

I would like to generate a Combobox with the active
excelfiles

I know that Windows(thexls).Activate works, but here for I
must know what the name 'thexls'

can someone help me?

thx
Lieven

Lieven

Find active Windows()
 
I found already a work-around, but can't this be done
easier?

i = 1
Do While i <= Windows.Count
Windows(i).Activate
ComboBox1.AddItem (" OPEN XLS SHEET: " &
ActiveWorkbook.Name)
i = i + 1
Loop


-----Original Message-----
Hi,

I would like to find out, how I can find which excelform
is open?

I would like to generate a Combobox with the active
excelfiles

I know that Windows(thexls).Activate works, but here for

I
must know what the name 'thexls'

can someone help me?

thx
Lieven
.


JON JON

Find active Windows()
 
Try

For Each wb In Application.Windows
ComboBox1.AddItem (" OPEN XLS SHEET: " & wb.Name)
Next wb

"Lieven" wrote in message
...
I found already a work-around, but can't this be done
easier?

i = 1
Do While i <= Windows.Count
Windows(i).Activate
ComboBox1.AddItem (" OPEN XLS SHEET: " &
ActiveWorkbook.Name)
i = i + 1
Loop


-----Original Message-----
Hi,

I would like to find out, how I can find which excelform
is open?

I would like to generate a Combobox with the active
excelfiles

I know that Windows(thexls).Activate works, but here for

I
must know what the name 'thexls'

can someone help me?

thx
Lieven
.





All times are GMT +1. The time now is 06:02 PM.

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