Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is what I'm currently using: The event triggers whenever a value i
enter manually anywhere in column "b" and a timestamp is added in colum z. My goal is to trigger this event when "pasting a new value" in colum "b". See the code that follows this example. I accidentally found it in thi forum and I'm hoping it could be modified by an expert to meet m requirement. TIA everybody! Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Me.Range("b:b")) Is Nothing Then Exit Sub If Target.Cells.Count 1 Then Exit Sub Application.EnableEvents = False On Error GoTo errHandler: With Target.Offset(0, 24) .Value = Now 'date .NumberFormat = "mm/dd/yyyy hh:mm" End With errHandler: Application.EnableEvents = True End Sub The following code works "if" information is pasted in a range. Private Sub Worksheet_Change(ByVal Target As Range) Dim cell As Range Dim changecolumn As Integer Dim changerow As Integer Dim changeworker As String On Error GoTo errhandler: Application.ScreenUpdating = False Application.EnableEvents = False For Each cell In Target changecolumn = cell.Column changerow = cell.Row changeworker = 0 If changecolumn = 89 Then Exit For Call change_flag(changerow, 1000, Me, changeworker) Next errhandler: Application.EnableEvents = True End Su -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Worksheet Change event | Excel Discussion (Misc queries) | |||
Worksheet Change Event | Excel Discussion (Misc queries) | |||
worksheet change event | Excel Programming | |||
Worksheet change event | Excel Programming | |||
Worksheet Change Event Help Please | Excel Programming |