Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Set Folder permission by macro

I am also interested in the ability to change folder permissions.

My needs are to add and delete names. And to print out the list.

I would appreciate input on this.

--
sb
"JON-JON" wrote in message
...
Dear Expert,

I created a macro that will create a folder that will be the container for
our monthly report. Is it possible to set the folders permission using
macro. I am using Office XP, OS XP and I am member of a domain

(user-level
access).

TIA

Jon-jon

Sub PL01_SetupFolder()
RepDate = LastMonEnd()
MkDir "C:\Report\" & Format(RepDate, "mmm yy")
MkDir "C:\Report\" & Format(RepDate, "mmm yy") & "\DIVISION 1 " &
Format(RepDate, "mmm yy")
MkDir "C:\Report\" & Format(RepDate, "mmm yy") & "\DIVISION 2 " &
Format(RepDate, "mmm yy")
End Sub

Function LastMonEnd() As Date
Dim MonthNum As Integer
RepMonNum = Month(Now()) - 1
Select Case RepMonNum
Case 2
LastMonEnd = DateSerial(Year(Now()), Month(Now()) - 1, 28)
Case 4, 6, 9, 11
LastMonEnd = DateSerial(Year(Now()), Month(Now()) - 1, 30)
Case 0
LastMonEnd = DateSerial(Year(Now()) - 1, 12, 31)
Case Else
LastMonEnd = DateSerial(Year(Now()), Month(Now()) - 1, 31)
End Select
End Function




Reply
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
folder permissions with a macro jatman Excel Discussion (Misc queries) 0 December 15th 08 10:07 PM
Macro creating folder and files automatically, without permission. pokdbz Excel Discussion (Misc queries) 1 November 8th 07 04:24 PM
Macro selects folder Jeff Excel Discussion (Misc queries) 1 July 31st 07 08:01 PM
Copy a folder by macro Brettjg Excel Discussion (Misc queries) 6 March 19th 07 10:51 PM
Changing Macro Folder JDub Excel Discussion (Misc queries) 1 July 31st 06 04:56 PM


All times are GMT +1. The time now is 02:27 AM.

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"