Hi,
Is there a way to remove read only attributes from all files in a folder using VBA?
I found this code and it works but only if I point it to a specific file. My file names are constantly changing in the folders I need to remove these from.
Dim fs As Variant, f As Variant
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("Filepath here")
f.Attributes = f.Attributes - (f.Attributes And (vbReadOnly + vbArchive))
Set fs = Nothing
Set f = Nothing
Is there a way to remove read only attributes from all files in a folder using VBA?
I found this code and it works but only if I point it to a specific file. My file names are constantly changing in the folders I need to remove these from.
Dim fs As Variant, f As Variant
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("Filepath here")
f.Attributes = f.Attributes - (f.Attributes And (vbReadOnly + vbArchive))
Set fs = Nothing
Set f = Nothing