I modified your script and merged it with mine. I hope this is what you want.

vb Code:
  1. Dim objFolder, obFileList, folderpath, fullpath, xl, i, j
  2. folderpath = "C:\Test"
  3.  
  4. Dim objFSO, objFile, objFc, objF
  5.  
  6. Set objFSO = CreateObject("Scripting.FileSystemObject")
  7. Set objFolder = objFSO.GetFolder("d:\")
  8. Set objFc = objFolder.SubFolders
  9. Set xl = CreateObject("Excel.application")
  10. if not objFSO.folderexists("d:\Forms") then
  11.         objFSO.CreateFolder("d:\Forms")
  12. end if
  13. if not objFSO.fileexists("d:\Forms\Test.xls") then
  14.     xl.application.workbooks.add
  15.     xl.application.save("d:\Forms\Test.xls")
  16.     xl.application.quit
  17. End if
  18. xl.Application.Workbooks.Open "d:\Forms\Test.xls"
  19. xl.Application.Visible = True
  20. set objSheet = xl.ActiveWorkbook.Worksheets(1)
  21.  
  22. i = 1
  23. j = 1
  24.  
  25. For Each objF in objFC
  26.     objSheet.Cells(i, j).value = objF.Name
  27.     i = i + 1
  28. Next
  29.  
  30. xl.DisplayAlerts = FALSE
  31. objSheet.saveas("d:\Forms\Test.xls")
  32. xl.application.quit