#1   Report Post  
Posted to microsoft.public.excel.misc
rk0909
 
Posts: n/a
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
NAVEEN
 
Posts: n/a
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
rk0909
 
Posts: n/a
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"