Posted by: कुश October 14, 2009
Login in to Rate this Post:
0
?
you need to write vba code sth like this:
Createobject FileSystemObject say fso.
get file name using GetFileName method of fso
iterate through the returned file names and assign it to the column B cell
Alternatively u can just use Dir(path) function similarly without creating fso object.
U need to put this code in the change event of the worksheet.
Also to prevent any other change in the worksheet to trigger above action,
do a intersection check of the changed range and the target range of cells.
Createobject FileSystemObject say fso.
get file name using GetFileName method of fso
iterate through the returned file names and assign it to the column B cell
Alternatively u can just use Dir(path) function similarly without creating fso object.
U need to put this code in the change event of the worksheet.
Also to prevent any other change in the worksheet to trigger above action,
do a intersection check of the changed range and the target range of cells.