Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    Posts
    225

    Unanswered: Help modify this code please

    someone kindly helped me to generate the following code, however i need it do a little extra to what it currently does.


    Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
    If Target.Locked = True Then

    ActiveSheet.Protect Password:="YourPassword"

    if Target.Column = 1 And Target.Row <= 19 Then
    On Error goto Dump
    ActiveSheet.Unprotect
    End if

    End If

    Dump:
    If Err.Number = 1004 Then
    MsgBox "Wrong Password"
    End If

    End Sub


    i need the range to also include cells b12:b2

    and

    d5:d9

    and

    e1:e4

    please help

    Andy
    Last edited by Chimp8471; 11-17-03 at 19:53.

  2. #2
    Join Date
    Mar 2003
    Posts
    225
    Now sorted thanks to all for your help

    Solution below

    http://www.ozgrid.com/forum/viewthread.php?tid=7607

    cheers

    Andy
    Last edited by Chimp8471; 11-18-03 at 06:14.

Posting Permissions

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