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
- Mar 09 Fri 2007 20:36
Excel VBA Target Worksheet change
close
全站熱搜
留言列表
發表留言