Results 1 to 4 of 4

Thread: [RESOLVED] where do i put this code

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Resolved [RESOLVED] where do i put this code

    Const tmpPassword = ""

    Application.ScreenUpdating = False
    Worksheets("Sheet1").Unprotect (tmpPassword)
    Worksheets("Sheet1").Protect (tmpPassword)

  2. #2
    Superbly Moderated NeedSomeAnswers's Avatar
    Join Date
    Jun 2002
    Location
    Manchester uk
    Posts
    2,657

    Re: where do i put this code

    What do you mean were do you put it !!!????

    When do you want it to run ?
    Please Mark your Thread "Resolved", if the query is solved & Rate those who have helped you



  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Re: where do i put this code

    the excel has option buttons hide columns and buttons if i put unportect and protect do i have to give when i save the command or when the sheet opens

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: where do i put this code

    try putting in the click for the option button, see if it does what you want
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

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



Click Here to Expand Forum to Full Width