DirsCombo_Read

Read directories in a specified folder into a combobox
Needs FrmBr having Cbo1

Sub DirsCombo_Read(ComboName, Optional LocPath = "")
With FrmBr
.Controls(ComboName).Clear ' .Cbo1.Clear
Fii = FixPath()
  If LocPath > "" Then Fii = LocPath
attr = vbDirectory + vbHidden + vbSystem
di = Dir(Fii, attr)
Do Until di = ""
If di = "." Or di = ".." Then GoTo 300
If GetAttr(FixPath(fii) & di) = vbDirectory Then .Controls(ComboName).AddItem di
300:
di = Dir
Loop
.Show
End With
End Sub

ComboName, Optional LocPath

Views 598 Downloads 221

'Dir()', 'Components', 'File System'

ANmarAmdeen
326
Components VBA
Revisions

v1.0