+ Reply to Thread
Results 1 to 3 of 3

Drop Menu with VLookup on Locked Cells solution!?

  1. #1
    Forum Contributor
    Join Date
    01-18-2013
    Location
    England
    MS-Off Ver
    2016 (Mac)
    Posts
    149

    Drop Menu with VLookup on Locked Cells solution!?

    Hello Everyone,

    I have a sheet that has a drop down menu. The list (drop down menu) contains names of staff that is updated all the time. Once the name of the member of staff is selected from the drop down menu the next cell is auto populated with the I.D. number by using VLookup. This works with no problem until I lock the cells and protect the sheet.

    Now when I select a name from the drop down menu I am met with the following error message: The cell or chart you are trying to change is protected and therefore read only.....

    I had a similar problem before that was solved (via a post on this forum) but will not work in this case because the drop menu described above contains names that change all of the time. In the code below the drop menu just contained numbers (1, 2,) that would trigger a macro (DayOne, Day Two).

    End Sub
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address(False, False) = "C6" Then

    Select Case Target.Value

    Case 1
    Call DayOne

    Case 2
    Call DayTwo

    End Select
    End If
    End Sub


    I was thinking that there may be a way to modify the above code so that it would be able to unlock the sheet populate the cells and re-lock the sheet again?

    Thank you in advance for any help,

    Regards,

    Margate

  2. #2
    Registered User
    Join Date
    07-27-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007/2010
    Posts
    86

    Re: Drop Menu with VLookup on Locked Cells solution!?

    To protect and unprotect sheet
    Please Login or Register  to view this content.
    Boon

  3. #3
    Forum Contributor
    Join Date
    01-18-2013
    Location
    England
    MS-Off Ver
    2016 (Mac)
    Posts
    149

    Re: Drop Menu with VLookup on Locked Cells solution!?

    Hello Bheanloh,

    Thank you for the reply. I need however to activate this macro whenever a choice is made from the drop menu?

+ 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