"Edit" feature?

paulgfscb

New Member
Joined
May 13, 2015
Messages
9
I have a protected Excel sheet that populates it's cell through a userform. Everything works great except that I have the cells locked down so that employees cannot change other employees data on accident. The problem i'm running into is that if an employee makes an unseen error then clicks Enter, they cannot edit the data and must contact support. Is there a way that I can create an Edit button or some other feature that would allow the employee to select a certain row and edit just the data in that row? Thank you.

Here is my code:

Code:
Private Sub Label1_Click()
    btnProspect.GroupName = "CustomerType"
    btnCurrent.GroupName = "CustomerType"
End Sub

Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdEnter_Click()
ActiveSheet.Unprotect Password:="fscbcall"
    Dim RowCount As Long
    Dim benefits, total As Single
   
' Write data to worksheet
    RowCount = Worksheets("Current Month").Range("A1").CurrentRegion.Rows.Count
    With Worksheets("Current Month").Range("A1")
        .Offset(RowCount, 0).Value = Me.txtInitials.Value
        .Offset(RowCount, 1).Value = Me.txtName.Value
        .Offset(RowCount, 2).Value = Me.btnProspect.Value
        .Offset(RowCount, 2).Value = Me.btnCurrent.Value
        .Offset(RowCount, 3).Value = Me.txtDate.Value
        .Offset(RowCount, 4).Value = Me.chkTop.Value
        .Offset(RowCount, 5).Value = Me.txtRemarks.Value
        .Offset(RowCount, 6).Value = Me.txtFollowupdt.Value
        .Offset(RowCount, 7).Value = Me.txtFollowupcmt.Value
        If Me.chkTop.Value = True Then
            .Offset(RowCount, 4).Value = "Yes"
        Else
            .Offset(RowCount, 4).Value = "No"
        End If
        If btnCurrent.Value = True Then
            .Offset(RowCount, 2) = "Current"
        ElseIf btnProspect.Value = True Then
            .Offset(RowCount, 2) = "Prospect"
        End If
                    
    End With
'Clear the form
    
Unload Me

With Worksheets("Current Month")
    With .Range("A7:H200")
        .Sort Key1:=.Columns("A"), Order1:=xlAscending, Key2:=.Columns("D"), Order2:=xlAscending, Header:=xlNo, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal
    End With

ActiveSheet.Protect Password:="fscbcall", DrawingObjects:=True, Contents:=True, Scenarios:=True _
 , AllowSorting:=True, AllowFiltering:=True, AllowUsingPivotTables:=True

End With
End Sub

Private Sub Textbox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    If Not txtDate.Value Like "##[/]##[/]####" Then
        MsgBox "Must Be Format mm/dd/yyyy"
        Textbox1.SetFocus
        Cancel = True
        Textbox1.Value = ""
 
Else: chkTop.Value
 
End If
End Sub

Private Sub txtRemarks_Change()

End Sub

Private Sub UserForm_Click()

End Sub
 
Last edited by a moderator:

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,215,577
Messages
6,125,640
Members
449,242
Latest member
Mari_mariou

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top