Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

File folders

Status
Not open for further replies.

Robert1688

Agricultural
Jan 13, 2007
14
Is there anyway to get folders' name and file name into spreadsheet automaticly? like this.

MyDoc
Pics
Colleagues
Remond.jpg
Steve.jpg
Family
Friends
Memos
Kids
Lucy
Business
Meeting

There may be a file in Windows System, but I don't know which one.
 
Replies continue below

Recommended for you

Sub test()
MsgBox ActiveWorkbook.Name
MsgBox ActiveWorkbook.Path
End Sub


TTFN

FAQ731-376


 
You're going to have to write a macro for that. Before I go any further, what is your comfort level with writing VBA macros?
 
Clyde38, Thanks for your chart.
handleman, I just can use VBA to write some functions which I can not get it from Excel. I don't know much about VBA. I made one like this:

Public Function VSearch(index1 As Variant, ar1 As Range, col1, col2 As Integer) As Variant

'to improve function of Vlookup, can search the other column - col1 is the column you want to search

t = 1
rows1 = ar1.Rows.Count

LineBack:
If t = rows1 + 1 Then
VSearch = "#N/A"
GoTo LineOut
Else: End If

If index1 = ar1(t, col1) Then
VSearch = ar1(t, col2)
Else
t = t + 1
GoTo LineBack
End If

LineOut:

End Function
 
Robert, your welcome. But I'm not sure you looked at what I suggested. It's not a chart. The "List and Print Excel Files" spreadsheet is just part of the index for Jon's Excel and Charting Pages. The spreadsheet will list and print more than just Excel files (all files).
 
Forget to say, IRstuff, Thanks

Anyhow, thanks guys, I will try more.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor