close

When I cut and paste the below MS excel macro into a new workbook
module sheet, it does not work?

I type the y in column c, this macro will not work...

Please help...
Private Sub Worksheet_Change(ByVal Target As Excel.Range)

If Target.Column = 3 Then

If (Target.Text = quot;yquot;) Then

MsgBox quot;helloquot;

End If
End If

End SubThis kind of code goes behind the worksheet.

If you rightclick on the worksheet tab that should have this behavior, you can
select view code.

Paste the code in that code window that just opened up.wrote:
gt;
gt; When I cut and paste the below MS excel macro into a new workbook
gt; module sheet, it does not work?
gt;
gt; I type the y in column c, this macro will not work...
gt;
gt; Please help...
gt;
gt; Private Sub Worksheet_Change(ByVal Target As Excel.Range)
gt;
gt; If Target.Column = 3 Then
gt;
gt; If (Target.Text = quot;yquot;) Then
gt;
gt; MsgBox quot;helloquot;
gt;
gt; End If
gt; End If
gt;
gt; End Sub

--

Dave Peterson

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

    software

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