Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2006
    Posts
    21

    Exclamation Unanswered: Getting Excel to only open an xls file if Macros are enabled

    Hey guys like the title says i need a way to password secure an xls file but inorder to do this i need macros enabled. any suggestions.

  2. #2
    Join Date
    Feb 2006
    Posts
    113
    I'm unclear from your description of what is required.

    Sounds like an instance where one might make (on file closure) all sheets xlSheetVeryHidden except one. That one "entry sheet" has a message along lines "macros must be enabled for this workbook to function".

    On file opening, an autorun routine hides this "entry sheet" and reveals the worksheets you want exposed. And if the file is opened without macros enabled, the autorun macro obviously won't run & this entry sheet is all that the user sees. VBA password protected, BTW.

    If that makes sense? Again, I'm not sure if this is what you're after...

    regards,
    Fazza

  3. #3
    Join Date
    May 2004
    Posts
    14
    Why don't you just use the password protection when you save the file?

    Save As
    Tools (icon at top right of window)
    General Options

    Enter a password to "open" the file
    enter a password to "modify" the file
    ttfn
    Kicker

  4. #4
    Join Date
    Feb 2006
    Posts
    113
    hi Kicker,

    What would that achieve? The file could be opened without having macros enabled. The original question is to not allow this situation.

    regards,
    Fazza

  5. #5
    Join Date
    Aug 2006
    Posts
    21
    Sorry for the late reply Fazza's process works fine and its the best course of action. Is there something better than the built in VBA Password Protection?

  6. #6
    Join Date
    Feb 2006
    Posts
    113
    Quote Originally Posted by Amazing_Spiderman
    Is there something better than the built in VBA Password Protection?
    Yes. However, I don't know about it. Suggest you start a new thread, 'cause this is really a new question and it will be seen by more people that way. (I understand one approach is to use Visual Basic and create a COM add-in. These are little more than familiar words to me; I've read this sort of answer but personally am unfamiliar with it.) Regards, Fazza

  7. #7
    Join Date
    May 2004
    Posts
    14
    Sorry Fazza
    I read that wrong.
    ttfn
    Kicker

  8. #8
    Join Date
    Feb 2006
    Posts
    113
    No worries, Kicker. We all read 'em wrong sometimes. I'm expert at it, even. :-)

  9. #9
    Join Date
    Mar 2004
    Location
    UK
    Posts
    82
    if you digitaly sign your work book using the tools menu in vba window and when you open your work book you tick "always trust this publisher" then the work book will open with marcos enabled every time (see my post on opening access runtime withoit the permissions box)

Posting Permissions

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