Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Option Explicit
Sub AA() Dim LstSubFldrs As Variant Dim lngth As Long LstSubFldrs = Array("Cat", "Barclay Mowlem", "Allflex", _ "AWU", "Burdekin Shire Council", _ "Business Success Group", "Cash Sales", _ "Colorado", "Flight Centre", "Foot Locker") UserForm1.ListBox1.List = LstSubFldrs UserForm1.Show lngth = UBound(LstSubFldrs) - LBound(LstSubFldrs) + 1 Range("A1").Resize(lngth, 1).Value = Application.Transpose(LstSubFldrs) End Sub -- Regards, Tom Ogilvy "Andy" wrote in message ... Hello I have an array ListSubFldrs that is a result of a macro that searches for sub-directory names within a folder. It can vary in size depending on how many sub-directories there are. eg. copied from Local Window... ListSubFldrs : ",Cat,Barclay Mowlem,Allflex,AWU,Burdekin Shire Council,Business Success Group,Cash Sales,Colorado,Flight Centre,Foot Locker" : Variant/String Any suggestions for code that would result in a vertical list in the .xls starting at A1. eg. Cat Barclay Mowlem Allflex AWU Burdekin Shire Council Business Success Group Cash Sales Colorado Flight Centre Foot Locker How do I then get this list into a list box within a form? Do I refer to the .xls or the Array 'ListSubFldrs'? Thanks, Andrew Heath |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Taking the Zeros out of an array when displaying | Excel Discussion (Misc queries) | |||
Spreadsheet not displaying | Excel Discussion (Misc queries) | |||
Pie chart not displaying % in spreadsheet | Charts and Charting in Excel | |||
Displaying URL images in a spreadsheet | Excel Discussion (Misc queries) | |||
Need help displaying array contents | Excel Programming |