RE: VBA

From: Likavcan, Alexander (Alexander.Likavcan@volkswagen.sk)
Date: 13. 09. 2000, 11:56 CEST


Dobry den ovahalik@atlas.cz, dna 13.09.2000 si napisal:

> Da se nejakym prikazem zjistit pocet souboru v urcitem adresari? Umim 
> pomoci dir vypsat soubory, rad bych ale naplnil nejake pole nazvy 
> souboru a dela mi problem stanovit velikost pole.
> (neco jako adresar.files.count).
>
treba mat v menu <Nastroje><Odkazy>  zaskrtnute Microsoft Office Object
Library 
torzo kodu:
'definovaný adresár
Cesta = "C:\Eigene Dateien\VBA\VB_Priklady\"

Set fs = Application.FileSearch
With fs
    .LookIn = Cesta ' pozri sa kde
    .FileName = "readme.*" po akych súboroch 
    .SearchSubFolders = True aj podadresare?
    .Execute 
 msgbox "Počet súborov: " &  .FoundFiles.Count
end with
'AleXXX



This archive was generated by hypermail 2.1.2 : 04. 09. 2001, 03:41 CEST