+ Reply to Thread
Results 1 to 3 of 3

workbook protect not working!

  1. #1
    Registered User
    Join Date
    04-04-2013
    Location
    Maplewood, MN
    MS-Off Ver
    Excel 2010
    Posts
    14

    workbook protect not working!

    I have this simple enough:

    ' run this when the workbook is opened
    Private Sub workbook_open()
    ActiveWorkbook.Protect Password:=mypassword, Structure:=True, Windows:=False
    End Sub

    when I open my workbook, the workbook is protect. I click on unprotectwork book and it doesn't prompt for a password, it just automatically unprotects it.

    Anyone know whats wrong?

    Thanks

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: workbook protect not working!

    Please Login or Register  to view this content.
    mypassword is a variable that is not set.

    try this...
    Please Login or Register  to view this content.
    Or this...
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-04-2013
    Location
    Maplewood, MN
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: workbook protect not working!

    nice stupid mistake on my part haha Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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