Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 16th, 2003, 12:00 PM
Authorized User
 
Join Date: Nov 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to step into Worksheet_Change

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

 
Old December 16th, 2003, 12:18 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 132
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Code:
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
 
Old December 17th, 2003, 04:11 AM
Authorized User
 
Join Date: Nov 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanx








Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help!!!!!Private Sub Worksheet_Change VicM Excel VBA 1 March 6th, 2008 10:35 PM
AjaxMAIL Step by Step waffa BOOK: Professional Ajax ISBN: 978-0-471-77778-6 3 September 25th, 2006 02:12 PM
How detailed are the step-by-step littleccguy BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 3 May 18th, 2006 03:45 PM
We Based Database Step By step desireemm SQL Language 1 October 15th, 2005 08:15 PM
Step by step installation peter_budo Beginning PHP 0 August 31st, 2004 12:04 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.