Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
To display contents of a folder in an excel sheet using Excel MACRO
Hi All,
i want to display some selected files (starting with a particular text) from a folder to an excel sheet. please tell me the MACRO code to implement the same. Thanks, Vishal |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
To display contents of a folder in an excel sheet using Excel MACRO
Enter your folder path in cell A1 Sub myDIR() myFolder = Range("A1").Value x = 1 y = 1 Range("A2").Select Selection = Dir(myFolder) Do While y < "" y = Dir Selection.Offset(x, 0).Value = y x = x + 1 Loop End Sub Matt -- Mallycat ------------------------------------------------------------------------ Mallycat's Profile: http://www.excelforum.com/member.php...o&userid=35514 View this thread: http://www.excelforum.com/showthread...hreadid=554910 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting Last Sheet | Excel Worksheet Functions | |||
excel 4.0 macro remover tool | Excel Discussion (Misc queries) | |||
Urgent Help Required on Excel Macro Problem | Excel Discussion (Misc queries) | |||
is there anyway in an excel macro to reorder the sheet tabs from left to right? | Excel Worksheet Functions | |||
Macro to copy range from Excel files in folder | Excel Discussion (Misc queries) |