Digita
06-28-2007, 06:23 PM
Hi everyone,
When I enter a value to a cell the following code is fired up to copy that value to the next cell on the right on same column.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Target(1, 2) = Target
Application.EnableEvents = True
End Sub
However, if I copy a value to a range (consisting more than 1 cell) or when I enter a value to a range (> 1 cell) by ctrl + alt + enter. This code is not activated. Any idea why?
Thanks in advance for your input.
Regards
KP
When I enter a value to a cell the following code is fired up to copy that value to the next cell on the right on same column.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Target(1, 2) = Target
Application.EnableEvents = True
End Sub
However, if I copy a value to a range (consisting more than 1 cell) or when I enter a value to a range (> 1 cell) by ctrl + alt + enter. This code is not activated. Any idea why?
Thanks in advance for your input.
Regards
KP