Private
Sub
expBtn_Click()
Dim
lngSave
As
Long
On
Error
Resume
Next
Dim
share
As
String
* 25
Dim
group
As
String
* 25
Dim
perm
As
String
* 25
Dim
server
As
String
* 15
Dim
file_name
As
Variant
Dim
TextFile
As
Integer
Dim
fso
As
Object
Dim
oFile
As
Object
file_name = Application.GetSaveAsFilename( _
InitialFileName:=
"permissions"
, _
FileFilter:=
"Textdateien (*.txt), *.txt"
)
If
file_name =
False
Then
Exit
Sub
End
If
Set
fso = CreateObject(
"Scripting.FileSystemObject"
)
Set
oFile = fso.CreateTextFile(file_name)
TextFile = FreeFile
Open file_name
For
Output
As
TextFile
For
lngSave& = 0
To
listBox.ListCount - 1
server = listBox.List(lngSave&)
share = listBox.List(lngSave&, 1)
perm = listBox.List(lngSave&, 2)
group = listBox.List(lngSave&, 3)
Print TextFile, server;
Print TextFile, share;
Print TextFile, perm;
Print TextFile, group
Next
lngSave&
Close TextFile
End
Sub