Avatar of Carolynne Donohue
Carolynne Donohue
 asked on

Protecting a Cell, from input but allow radio button commend to populate the field with the user id and timestamp

I want to protect a cell from editing but allow the cell to be populated with a radio command button that populates the cell with the user id and timestamp.  a pop up message appears when the cell has been populated (in my case approving the form).  I can certainly lock the cell but then the radio button doesn't work,  what do I need to add on the front end of marco below?

Sub Product()

  UserName = Environ("username")
    ActiveCell.FormulaR1C1 = UserName
    ActiveCell.FormulaR1C1 = " " & Now

    x = UCase(Range("$i$5").Value)
    y = UCase(Range("$i$3").Value)
    If x = y Then

    MsgBox "ERROR - APROVER ID ERROR" & vbNewLine & vbNewLine & "Product Approver ID must be different then Sales Approver ID"

    ActiveCell = vbNullString
    ActiveCell = vbNullString
    Exit Sub
    End If

    MsgBox "Approved"
End Sub
SalesMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

A solution
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes