View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Peter Huang Peter Huang is offline
external usenet poster
 
Posts: 115
Default Mimic Value Being Typed Into Cell

Hi Matthew,

Thanks for your quickly reply!

Thanks for posting in the community.

First of all, I would like to confirm my understanding of your issue.

From your description, I understand that you hope when the change the
value in the cell, a event will be fired.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.


I agree with TOM's suggestion.
Here is my test code.

Sub Test()
'run the macro first to set the OnEntry
ThisWorkbook.ActiveSheet.OnEntry = "Hello"
End Sub
Sub Hello()
MsgBox "hello"
End Sub
Sub sdaf()
'This will not fire the Hello() Macro
Application.ActiveSheet.Cells(1, 1) = "fdsf"
End Sub

Also have you tried to hook the SheetChange event, which will be fired when
the cell was changed by manual or by coding.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
MsgBox "Sheet changed"
End Sub


Please apply my suggestion above and let me know if it helps resolve your
problem.


Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.