Macro problem
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Macro problem

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    Massachusetts, USA
    Posts
    255
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I have an excel spreadsheet with 2 simple macros, which run in a specific order. Both macros unprotect the spreadsheet as the first step, and protect with the last step (password is included in code). After I run the first macro, if I go to unprotect the sheet, I am NOT prompted for a password. If I run the second macro, and then try to unprotect the sheet, I am prompted for a password. The macros both have the same language...???

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,959
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    The .Protect and .Unprotect methods have an optional parameter which is the password. Are you sure you're supplying it when you unprotect and when you re-protect ?
    Regards,

    Juan Pablo González
    http://www.juanpg.com

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    Massachusetts, USA
    Posts
    255
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Yes - both macros are identical with regards to the protect, unprotect. I am begining to think it is a glitch.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com