मैं एक कार्यात्मक सरणी बनाना चाहता हूं जो सभी फ़ाइल के नाम को पर्टिकुलर फ़ोल्डर में संग्रहीत करता है
यह मैंने कोशिश की है ..
Function number_of_file(i As Integer) As Variant
Dim file_object As Object
Dim files_in_folder() As Variant
Set file_object = CreateObject("scripting.filesystemobject").getfolder("D:\ls")
i = 0
For Each obj In file_object.Files
ReDim files_in_folder(i)
files_in_folder(i) = obj.Name
i = i + 1
Next obj
number_of_files = files_in_folder
End Function
sub test()
files_in_folder(2)
end sub