General discussion

Locked

Excel/VBA - populate listbox

By CBDepadua ·
I would like to populate my listbox with the names of all .xls workbooks currently open. My objective would be to capture the name of the .xls so that i can copy from one workbook and paste link into another workbook. This is the only way that i can think to do this. If you have a better idea, please share it with me.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Excel/VBA - populate listbox

by DKlippert In reply to Excel/VBA - populate list ...

This piece of code may give you some ideas:

Sub OpenWorkbooks()
Dim WB As Excel.Workbook
For Each WB In Workbooks
MsgBox WB.Name
Next WB
'This creates an array you can be refer to by number
MsgBox Workbooks(1).Name

End Sub

Collapse -

Excel/VBA - populate listbox

by CBDepadua In reply to Excel/VBA - populate list ...

That was very helpful, thank you

Collapse -

Excel/VBA - populate listbox

by CBDepadua In reply to Excel/VBA - populate list ...

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums