close

If A1 has any value entered I want to require B1 to be filled in.

For example if an employee puts ome thing in A1 I want them to put their
name in B1.

I'd also like to force todays date into C1

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 1 Then
Target.Offset(0, 1) = Environ(quot;Usernamequot;)
Target.Offset(0, 2) = Format(Date, quot;dd mmm yyyyquot;)
End If
End Sub

This is worksheet event code, which means that it needs to be
placed in the appropriate worksheet code module, not a standard
code module. To do this, right-click on the sheet tab, select
the View Code option from the menu, and paste the code in.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

quot;Herb Wexlerquot; gt; wrote in message
...
gt; If A1 has any value entered I want to require B1 to be filled in.
gt;
gt; For example if an employee puts ome thing in A1 I want them to put their
gt; name in B1.
gt;
gt; I'd also like to force todays date into C1

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()