Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Change Event

Add to worksheet module:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$1" Then
'add code here or call macro
'change $B$1 to suit
End if
End Sub

Hth,
Merjet

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default Change Event

is it possible to have multiple ifs to trigger event I am having no luck
Thanks

"merjet" wrote:

Add to worksheet module:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$1" Then
'add code here or call macro
'change $B$1 to suit
End if
End Sub

Hth,
Merjet


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 812
Default Change Event

Yes, there can be 1 trigger.

Merjet


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default Change Event

Not sure if I am going right way. For some reason my trigger in a column is
not triggering the call.

If Target.Column = 9 And Target.Value 1 And IsNumeric(Target.Value) Then _
Call CopyMailE(Target)
Have two other procedures that work fine on column 12 different values for
trigger
Just for good measure will add copymaile

Public Sub CopyMailE(ByVal Target As Range)
Dim wksSummary As Worksheet
Dim rngPaste As Range
Set wksSummary = Sheets("Maile")
Set rngPaste = wksSummary.Cells(65536, "A").End(xlUp).Offset(1, 0)
Application.EnableEvents = False
Target.Parent.Cells(Target.Row, 1).Resize(5, 9).Copy _
Destination:=rngPaste
Application.EnableEvents = True
End Sub
Help greatly appreciated
Thanks


"merjet" wrote:

Yes, there can be 1 trigger.

Merjet



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default Change Event

got it
thanks

"merjet" wrote:

Yes, there can be 1 trigger.

Merjet





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default Change Event

I miss phrased my question. What I a want is.
if column 11 = 10 and column 2 =2 then call procedure
Have tried to do this in procedure with no luck. So now will use two diff
procedures if I can control action of trigger by two cells.
I do use two triggers in one row thanks to your responce.
Thanks


"merjet" wrote:

Yes, there can be 1 trigger.

Merjet



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Change Event


I don't see the original thread ( PLEASE stay in original) so I will try to
guess.
if cells(target.row,11)=10 AND cells(target.row,2)=2 then call mymacro
--
Don Guillett
SalesAid Software

"Curt" wrote in message
...
I miss phrased my question. What I a want is.
if column 11 = 10 and column 2 =2 then call procedure
Have tried to do this in procedure with no luck. So now will use two diff
procedures if I can control action of trigger by two cells.
I do use two triggers in one row thanks to your responce.
Thanks


"merjet" wrote:

Yes, there can be 1 trigger.

Merjet





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


Similar Threads
Thread Thread Starter Forum Replies Last Post
MsgBox in Enter event causes combobox not to run Change event Richard Excel Programming 0 March 6th 06 02:52 PM
Change event and calculate event Antje Excel Programming 1 March 29th 05 09:03 PM
Change Cell from Validated List Not Firing Worksheet Change Event [email protected] Excel Programming 3 October 4th 04 03:00 AM
change event/after update event?? scrabtree23[_2_] Excel Programming 1 October 20th 03 07:09 PM


All times are GMT +1. The time now is 06:39 PM.

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

About Us

"It's about Microsoft Excel"