🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: be.comp.programming
2 messages
2 total messages Started by Bert Vanbellinghen Tue, 30 Dec 2003 17:46
VBA ACCESS
#3537
Author: Bert Vanbellinghen
Date: Tue, 30 Dec 2003 17:46
6 lines
1115 bytes
Hi,

Hoe kan ik in vba al de bestanden in een directory doorlopen en per bestand
de naam en eigenschappen wegschrijven in een tabel in access?

Groeten
Re: VBA ACCESS
#3541
Author: Billyke
Date: Wed, 31 Dec 2003 16:22
36 lines
1915 bytes
Bert,

Deze manier is de simpelste:

    Dim sFile As String
    Dim sFolder As String
    sFolder = "C:\Windows"
    If Right(sFolder, 1) <> "\" Then sFolder = sFolder & "\"
    sFile = Dir(sFolder, vbNormal)
    Do Until sFile = ""
        Debug.Print sFolder & sFile
        sFile = Dir
    Loop

In plaats van de debug.print kan je jouw functie aanroepen die het record
zal wegschrijven.

Je kan ook gebruik maken van de API's FindFirstFile() en FindNextFile(),
maar als je geen ervaring hebt met API's kan je toch beter bovenstaande
manier gebruiken...


Succes!


"Bert Vanbellinghen" <bert.vanbellinghen@pandora.be> schreef in bericht
news:tRiIb.105308$I%1.4670511@phobos.telenet-ops.be...
> Hi,
>
> Hoe kan ik in vba al de bestanden in een directory doorlopen en per
bestand
> de naam en eigenschappen wegschrijven in een tabel in access?
>
> Groeten
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads