Consulting

Results 1 to 2 of 2

Thread: Password entry

  1. #1
    VBAX Regular
    Joined
    Oct 2007
    Posts
    7
    Location

    Password entry

    Hi - can anybody help me. I need to unprotect a worksheet, amend it and then protect it again. The rest of the vba runs fine but I don't know how to include the password into the code so it doesn't have to entered manually as the code runs.
    I'm very new to vba so any help is much appreciated.
    Thanks in advance.
    Charles

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]
    Activesheet.Unprotect Password:="my_Password"

    'do your stuff

    Activesheet.Protect Password:="my_Password"
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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