Hide Folder Macro
Raj wrote:
On Jul 24, 3:13 pm, CoRrRan wrote:
Raj wrote:
Hi all,
I would like to know if using a macro can we hide a folder,
if yes can i know how can i do it.......
Yes you can:
****************
Sub ChangeFolderAttribs()
Dim FSO As Scripting.FileSystemObject
Set FSO = New Scripting.FileSystemObject
FSO.GetFolder("C:\Temp\").Attributes = Hidden
Set FSO = Nothing
End Sub
****************
Make sure you have a reference to "Microsoft Scripting Runtime" (VBE --
Tools -- References -- select "Microsoft Scripting Runtime" and close
with "OK".)
CoRrRan
Thx.......... how to unhide the folder...........
Change:
FSO.GetFolder("C:\Temp\").Attributes = Hidden
To:
FSO.GetFolder("C:\Temp\").Attributes = Normal
CoRrRan
|