I don't know short title for what I need.

G

Guest

Here is what i have:

starting on row 9 on down to whatever row A B
C D
date of job
Emp Name ID# PIN#
Column A is a range of dates for different side jobs that an employee can
sign up for and work. And right now entering the proper pin# returns the id#
of the employee, which in turn returns the employees name.
When the proper pin# is entered (proper pin is verified only when the id#
is returned in C, otherwise C remains blank) I want a user form to appear
confirming that the employee wants to sign up for the date which appears in
the date of job column. Example

A B C D
date of job emp name ID# Pin#

11/1/04 john smith 123 2468 (upon
entering this pin)>

User form appears "Confirm that you want to sign up for 11/1/04"
yes button no button

if yes lock the cell that contains the pin#
if no clear the cell that contains the pin#

I am sorry if this post is short on clarity I tried my best.
Thank You
Brian
 
S

Sharad Naik

Try this, with Worksheet_Change macro:-

Private Sub Worksheet_Change(ByVal Target As Range)
If Not (Target.Column = 4 And Target.Row > 8) Or IsEmpty(Target) Then Exit
Sub
If MsgBox("Confirm that you want to sign up for " & Date, vbYesNo) = vbYes
Then
Target.Locked = True
Else
Target.ClearContents
End If
End Sub

Sharad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top