Hello,
I am wondering how I can write a macro to set file attributes to hidden/read only, when I close it. Any tips are welcome. Thank you in advance.
Hello,
I am wondering how I can write a macro to set file attributes to hidden/read only, when I close it. Any tips are welcome. Thank you in advance.
Last edited by Karolis; 09-21-2010 at 03:23 AM.
After closing:
![]()
Please Login or Register to view this content.
Last edited by snb; 09-20-2010 at 09:44 AM.
sorry, i'm not very great with excel. where do i have to put this in vba? in workbook general?
Put this code in the 'ThisWorkbook module in teh VBEditor (alt-F11)
The file will be Hidden & Readonly.
![]()
Please Login or Register to view this content.
ThanxI was about to post that I figured it out already. Just one more question:
attributes = 1 file is read only
attributes = 2 file is hidden
attributes = 3 file is read only and hidden.
Am I correct? and is there more options?
You are correct, more options you'll find in the VBEditor's help, look for 'attributes'.
Note that a reference is required.![]()
Please Login or Register to view this content.
Examples:
See VBE help for Attributes Property for a list![]()
Please Login or Register to view this content.
Last edited by shg; 09-21-2010 at 08:45 AM.
Entia non sunt multiplicanda sine necessitate
Thank you very much for your help! This is solved!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks