+ Reply to Thread
Results 1 to 7 of 7

Locking the use of Macros from other Workbooks

Hybrid View

  1. #1
    Registered User
    Join Date
    08-09-2010
    Location
    Midlands
    MS-Off Ver
    Excel 2010
    Posts
    38

    Locking the use of Macros from other Workbooks

    Hi All,

    I have an interesting conundrum. I have been given an excel spread sheet which contains sheets which should remain hidden and protected at all times. So far I have protected the sheets, made them VeryHidden and locked the VBA project for editing. My problem however is that if you open another instance of Excel and hit Alt+F11 you can run macros which will make the sheets unlocked and visible.

    Is there a way to lock Excel further so that if a specific spread sheet is open then it doesn't allow for macros which are written by the user to bypass the security?

    The information behind it is calculations and I have of course suggested that they rebuild it in a more secure manner, at least at first making VBA do the calculations but we don't have the time to deliver that just yet.

    any and all help would be appreciated on this one.

    Many Thanks
    Maudise

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Locking the use of Macros from other Workbooks

    Hi, I'm not sure if this will work in the 2003 version but in you IDE click Tools, VBAProject Properties, Protection, check Lock project for viewing, set a password, and then click OK.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  3. #3
    Forum Contributor bonny24tycoon's Avatar
    Join Date
    04-02-2012
    Location
    Hell
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    405

    Re: Locking the use of Macros from other Workbooks

    Hi Mordred - Its the same in 2003




    Thanks,

    Bonny Tycoon



    **If I was able to help please click the small star icon at the bottom left of my post **

  4. #4
    Registered User
    Join Date
    08-09-2010
    Location
    Midlands
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Locking the use of Macros from other Workbooks

    sorry, I'm on excel 2010 have just updated that aspect.

    I've locked the VBA project for viewing using a secure password, my problem largely resides in the fact that you can open a blank excel workbook, then open my document and run a simple
    sub Unhide_Sheets()
    Sheets(1).visible = xlsheetvisible
    Sheets(2).visible = xlsheetvisible
    Sheets(3).visible = xlsheetvisible
    end sub
    And by running that macro when my document is selected it'll unhide the sheets.

    Thanks
    Maudise

  5. #5
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Locking the use of Macros from other Workbooks

    Quote Originally Posted by Maudise View Post
    sorry, I'm on excel 2010 have just updated that aspect.

    I've locked the VBA project for viewing using a secure password, my problem largely resides in the fact that you can open a blank excel workbook, then open my document and run a simple
    sub Unhide_Sheets()
    Sheets(1).visible = xlsheetvisible
    Sheets(2).visible = xlsheetvisible
    Sheets(3).visible = xlsheetvisible
    end sub
    And by running that macro when my document is selected it'll unhide the sheets.

    Thanks
    Maudise
    I think you'll find that there is no way to completely stop someone from accessing sheets and code as you've just pointed out. The only saving grace is that most people that use Excel or other Office products, haven't got a clue regarding how to actually hack a workbook.

  6. #6
    Forum Contributor bonny24tycoon's Avatar
    Join Date
    04-02-2012
    Location
    Hell
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    405

    Re: Locking the use of Macros from other Workbooks

    I agree with Modred.. Now a days we have free add-ins and macros to hack or crack sheet passwords, workbook passwords and VBA passwords..

    Its pretty much too hard to stop this from happening..




    Thanks,

    Bonny Tycoon



    **If I was able to help please click the small star icon at the bottom left of my post **

  7. #7
    Registered User
    Join Date
    08-09-2010
    Location
    Midlands
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Locking the use of Macros from other Workbooks

    ah well, we'll look at making it a secure website or something similar.

    Many thanks for the help, I'll mark as solved considering it's not actually possible.

    Maudise

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1