Find active Windows()

  • Thread starter Thread starter Lieven
  • Start date Start date
L

Lieven

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
 
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
 
Try

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top