Hi All,
I currently have the following macro which makes all files in a particular folder read only:
Sub setFileReadOnly()
Dim sPath As String
Dim sFile As String
sPath = "C:\Users\tp\Documents\B\*.*"
sFolder = Dir(sPath & "*.*")
Do Until sFile = ""
SetAttr sPath & sFile, vbReadOnly
sFile = Dir
Loop
End Sub
It's probably simple, but how I can amend this to include all the files and subfolders underneath folder B please?
Thanks in advance,
Paul
I currently have the following macro which makes all files in a particular folder read only:
Sub setFileReadOnly()
Dim sPath As String
Dim sFile As String
sPath = "C:\Users\tp\Documents\B\*.*"
sFolder = Dir(sPath & "*.*")
Do Until sFile = ""
SetAttr sPath & sFile, vbReadOnly
sFile = Dir
Loop
End Sub
It's probably simple, but how I can amend this to include all the files and subfolders underneath folder B please?
Thanks in advance,
Paul