LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default 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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to look for the Folder Path using macro???? Jac Excel Programming 6 May 17th 07 05:20 PM
Run macro from directory folder...? Clarissa Excel Programming 2 May 11th 07 06:17 AM
Save file in a new folder, but create folder only if folder doesn't already exist? nbaj2k[_40_] Excel Programming 6 August 11th 06 08:41 PM
Creating a folder using macro... ChrisMattock[_16_] Excel Programming 12 May 25th 06 05:21 PM
Macro Folder Scottmk[_21_] Excel Programming 5 August 26th 04 05:04 PM


All times are GMT +1. The time now is 10:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"