[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 :D
thanks all