![]() |
VBA Help
Hello,
Would appreciate a quick response. I need to define an event which triggers a macro if a particular cell in a sheet is changed. I could find an event for change in the workseet but no for a particular cell. Thanks in advance, rk |
VBA Help
Hi
Yes, there is no such procedure in Excel. But you can check that the changed cell is the one you wanted. The following piece of code will help you. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 3 And Target.Column = 2 Then MsgBox "This is the thing that rk0909 wanted" End If End Sub With kind regards, NAVEEN "rk0909" wrote: Hello, Would appreciate a quick response. I need to define an event which triggers a macro if a particular cell in a sheet is changed. I could find an event for change in the workseet but no for a particular cell. Thanks in advance, rk |
VBA Help
Naveen, thanks a lot it just worked fine.
RK "NAVEEN" wrote: Hi Yes, there is no such procedure in Excel. But you can check that the changed cell is the one you wanted. The following piece of code will help you. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Row = 3 And Target.Column = 2 Then MsgBox "This is the thing that rk0909 wanted" End If End Sub With kind regards, NAVEEN "rk0909" wrote: Hello, Would appreciate a quick response. I need to define an event which triggers a macro if a particular cell in a sheet is changed. I could find an event for change in the workseet but no for a particular cell. Thanks in advance, rk |
All times are GMT +1. The time now is 08:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com