Subject: How to step into Worksheet_Change
Posted By: Piblon Post Date: 12/16/2003 11:00:42 AM
I wonder how it is possible to step into
Private Sub Worksheet_Change(ByVal Target As Range)
(This is a built-in Sub within Excel)
As i understand it is not possible because of parameter Target, but I sure want to have the possibility to step into this Sub

Thanks
Piblon

Reply By: chrislepingwell Reply Date: 12/16/2003 11:18:48 AM
All you need to do is select the code page for the worksheet in question, select the dropdown at the top left (which should say '(general)'), pick 'Worksheet' then select the 'Change' member of the dropdown on the right. This will give you the Event sub.  For a test, write this into it
Private Sub Worksheet_Change(ByVal Target As Range)

MsgBox Target.Address

End Sub

Got to the actual sheet, type something into a cell, and hit enter. You should get a messagebox showing the affected cell.  Then all you need to do is place a breakpoint in the code, and you're done.

Chris



There are two secrets to success in this world:
1. Never tell everything you know
Reply By: Piblon Reply Date: 12/17/2003 3:11:18 AM
Thanx




Go to topic 7595

Return to index page 985
Return to index page 984
Return to index page 983
Return to index page 982
Return to index page 981
Return to index page 980
Return to index page 979
Return to index page 978
Return to index page 977
Return to index page 976