|
-
May 7th, 2006, 03:28 AM
#1
Thread Starter
Junior Member
[RESOLVED] Making a new folder
Hello everyone,
I am having a silly problem but it is driving me crazy.
When i try to make a new directory using mkdir or filesystemObject in VB 6 it always makes it with "read-only" attribute and then if i try to write or overwrite something in it, it tells me "Access denied". I tried to change the attribute before writing or overwriting to it using the following code:
Function CreateFolder(sFolderName As String)
Dim objFSO As Scripting.FileSystemObject
Dim objFolder As Scripting.Folder
Dim strFolderPath As String
Dim attr As Scripting.FileAttribute
Set objFSO = New Scripting.FileSystemObject
Set objFolder = objFSO.CreateFolder(sFolderName)
objFolder.Attributes = Normal
End Function
It does not work, if i try to change the attribute to something other than 'Normal' it would work fine. It doesn't like 'Normal' though.
Help Please
thanks all
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|