Data Recording Officer Signing In
First enter this at the top of a standard module:
Public s As String
Sub Button3_Click()
s = Application.InputBox("Enter Name:", 2)
End Sub
Second, create a button with the forms toolbar and assign Button3_Click to it.
Third, open Worksheet code and enter:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A:A")) Is Nothing Then
Exit Sub
End If
n = Target.Row
Cells(n, "D").Value = s
End Sub
When the button is punched, the name will be saved in the public string s.
Whenever an entry in made in column A, that name is entered in Column D in
the same row.
--
Gary's Student
"FARAZ QURESHI" wrote:
I have designed a welcome dialogue box for signing in requiring the data
recording officer to enter his name.
What macro should i assign to the sign in button so as to have the name of
the recording officer appear in Column D for every entry he makes in Column A?
|