This should work.Code:Private Sub Command1_Click() Dim X As String Const Pth = "C:\" X = Dir(Pth, vbDirectory) While X <> "" If (GetAttr(Pth & X) And vbDirectory) = vbDirectory Then List1.AddItem X End If X = Dir() Wend End Sub
|
Results 1 to 4 of 4
Thread: Finding ONLY directories..Threaded View
|
Click Here to Expand Forum to Full Width |