LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default how to create macro that will display the sub_subfolder

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a macro to create excel line graph with coloured pointers anddata lables anuj datta Charts and Charting in Excel 1 September 30th 09 04:04 PM
create searchable data and display on the web Annie Excel Discussion (Misc queries) 0 March 5th 09 08:41 PM
Create from to display data from another tab JHLou Excel Discussion (Misc queries) 4 March 14th 08 08:33 PM
Can I create a display box to see results no matter where I am in jeroamd Excel Discussion (Misc queries) 3 June 27th 06 04:20 PM
how do i create a macro to clear checkboxes and display a message. Xavierskyrider Excel Programming 7 February 25th 05 09:37 PM


All times are GMT +1. The time now is 12:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"