title image


Smiley TIPP: Datei erstellen...


Such dir eins aus:



Private Declare Function apiCreateFile Lib "kernel32.dll" _

Alias "CreateFileA" _

(ByVal lpFileName As String, ByVal dwDesiredAccess As Long, _

ByVal dwShareMode As Long, ByVal lpSecurityAttributes As Long, _

ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, _

ByVal hTemplateFile As Long) As Long

Private Const GENERIC_READ = &H80000000

Private Const GENERIC_WRITE = &H40000000

Private Const OPEN_EXISTING = 3

Private Const CREATE_ALWAYS = 2

Private Const INVALID_HANDLE_VALUE = -1

Private Const FILE_ATTRIBUTE_NORMAL = &H80



Public Sub CreateFile1(FName As String)

apiCreateFile FName, _

GENERIC_READ Or GENERIC_WRITE, _

0&, 0&, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0&

End Sub



Public Sub CreateFile2(FName As String)

Dim C As Integer

C = FreeFile

Open FName For Output As #C

Close #C

End Sub



Public Sub CreateFile3(FName As String)

Dim FSO As New Scripting.FileSystemObject

FSO.CreateTextFile FName, True

Set FSO = Nothing

End Sub





Gruß aus dem Norden
Reinhard


Bitte immer die Access-Version angeben!
DB-Wiki


Wie man Fragen richtig stellt

YaccessAccess-FAQUnd ansonsten: Wikipedia




geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: