Results 1 to 2 of 2
  1. #1
    New Lounger
    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:
    Sub HideAndSave()
    1 Set Newbook = Workbooks.Add
    2 Newbook.Activate
    3 DoSomething
    4 ActiveWindow.Visible = False
    5 Newbook.SaveAs filename:="defaultstuff.xls"
    End Sub
    ...but do not want all of this functionality. If this is close can someone advise the edits for me? THANKS!

  2. #2
    WS Lounge VIP sdckapr's Avatar
    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts