Results 1 to 2 of 2
2004-04-28, 15:27 #1
- Join Date
- Apr 2004
- North Dakota
- Thanked 0 Times in 0 Posts
Save with Hidden Attribute ON (Excel 2000 VB)
I have been looking all over for a way to keep the hidden attribute on when saving edited files. FYI, the files are hidden and opened through an index, but lose the hidden attribute when edited and saved. Anyone know a VB snippet that will enforce the Hidden attribute? I found this one:
1 Set Newbook = Workbooks.Add
4 ActiveWindow.Visible = False
5 Newbook.SaveAs filename:="defaultstuff.xls"
...but do not want all of this functionality. If this is close can someone advise the edits for me? THANKS!
2004-04-28, 16:32 #2
- Join Date
- Jul 2002
- Pittsburgh, Pennsylvania, USA
- Thanked 342 Times in 335 Posts
Re: Save with Hidden Attribute ON (Excel 2000 VB)
If you are trying to make a Hidden in excel you must do as you describe set the visible property to false. SInce this properly is saved with the file, I assume you are making it visible after you open it so you can work with it.
If you mean the "hidden attribute" in windows you can use something like this line in code (after you have saved and closed the file):
<pre>SetAttr "h:hideme.xls", vbHidden</pre>
To set the properties of the file to hidden