Home |
Search |
Today's Posts |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I' ve solved the prob... thanxs... ; Bob Phillips wrote: Public Sub ListFolders2() Dim SH As Worksheet Dim FSO As Object Dim StartFolder As Object Dim Fldr As Object Dim iCtr As Long Const sName As String = "Home" Dim sStartDir As String sStartDir = InputBox( _ Prompt:="Enter the initial directory", _ Default:="C:\") On Error Resume Next Set SH = Worksheets(sName) Set FSO = CreateObject("Scripting.FileSystemObject") Set StartFolder = FSO.GetFolder(sStartDir) SH.Cells(1, "A").Value = sStartDir For Each Fldr In StartFolder.SubFolders iCtr = iCtr + 1 SH.Cells(iCtr + 1, "A").Value = Fldr.Name Next Fldr SH.Columns("A").AutoFit Set SH = Nothing End Sub Hi Cyzax, [quoted text clipped - 99 lines] I have tried so many ways, but it doesn't works. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200606/1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create a macro to create excel line graph with coloured pointers anddata lables | Charts and Charting in Excel | |||
create searchable data and display on the web | Excel Discussion (Misc queries) | |||
Create from to display data from another tab | Excel Discussion (Misc queries) | |||
Can I create a display box to see results no matter where I am in | Excel Discussion (Misc queries) | |||
how do i create a macro to clear checkboxes and display a message. | Excel Programming |