Thread: Trigger or code
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Curt Curt is offline
external usenet poster
 
Posts: 469
Default Trigger or code

Here is my trigger code. I enter the cell and make it active then hit an
option button that takes me to another sheet. On that sheet the entry is made
you then leave the cell of entry and then hit an option button to paste data
into cell that is to trigger. The incoming data is shrunk to fit into cell.
It will all ways be text in this cell.
Have other triggers useing isnumeric no problem this one rejects istext.

If Target.Column = 12 And CDbl(Target.Value) <= 0 And (Target.Value) Then _
Call Announcer(Target)

Following is code that trigger is to call
Public Sub Announcer(ByVal Target As Range)
Dim wksSummary As Worksheet
Dim rngPaste As Range
Set wksSummary = Sheets("Announcer")
Set rngPaste = wksSummary.Cells(65536, "A").End(xlUp).Offset(1, 0)
Application.EnableEvents = False
Set rngPaste = rngPaste.Offset(0, 0)
Union(Target.Offset(0, -11), Target.Offset(0, 8), _
Target.Offset(0, 7), Target.Offset(0, 5), (Target)).Copy _
Destination:=rngPaste
Application.EnableEvents = True
End Sub

All of this compiles good
Thanks Everyone