473,387 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Breakpoint in Excel VBA not breaking

30
Working with Excel 2003, I have a worksheet that I programatically generate from another worksheet. On this worksheet are two events, a selection change event and worksheet_change event. The selection change event just forces an application.calculate. The worksheet change is:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2.  
  3.   'Ensure we are connected to code and disable all events/updating
  4.   If Not StartEvent Then Exit Sub
  5.  
  6.   WBSFinalWorksheetChange Target
  7.  
  8.   'Reenable events/updating
  9.   EndEvent
  10.  
  11. End Sub
I know the code runs when the worksheet_change should, but if I put a breakpoint on the method header, the code doesn't stop at all. When the code runs, it reaches a command to do a findnext, and never reaches the next line (I used msgbox lines throughout the code to track the codes progress since breakpoints weren't working) There is no error handling in the code, so an error should kick it out, but I think it's a function of the breakpoints not working. Has anyone seem anything like this or have any idea what is going on?
May 23 '08 #1
1 4525
kadghar
1,295 Expert 1GB
I think it's because the 'If Not StartEvent Then Exit Sub'

perhaps you're always exiting there, so you never reach the code below (the one with the breakpoint)

now, if your breakpoint is in the EVENT header, well, since that line is not an executable one, it'll never be reached, why dont you put the break point in the first executable line (lets say the 'If Not StartEvent Then' one.
Jun 23 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Phil Powell | last post by:
What would one best recommend to parse an existing Excel spreadsheet (was done in Excel 97 or 2000 not sure to be honest)? I am looking for the most practical way of parsing an existing...
3
by: yanir | last post by:
Hi I use reponse.contenttype = "application/vnd.ms-excel" So the browser will show the data in excel format, but for some fields I use leading zero's, which truncated by the browser, at this...
3
by: Kevin | last post by:
When I run (F5) my web app and put a breakpoint on page load it won't stop at the breakpoint! The code that's in the routine executes, but ..NET won't stop at the breakpoint! It's driving me...
3
by: PaulThomas | last post by:
I am working with Visual Studio .Net and XP-Pro. Why / What have I done that a breakpoint won't stop in debug? I have used the debug before and all went well? I have tried starting with Debug...
4
by: Gary Wright | last post by:
I have an Access 2K database split into front and back. Quite often the users want to do some data analysis that I have not created a report for so they want to export some subset of the data into...
1
by: (Pete Cresswell) | last post by:
I'm debugging an app that has a Reference to Excel 9.0 (i.e. Office 2000's Excel). A guy who is trying to test it for me has Office 2003 (Excel 10? Excel 11?) installed on his PC and the most...
3
by: kunal.kewalramani | last post by:
I'm opening an Excel file using ASP.NET, but Excel process remains it is not killed, I tried killing it by using Quit() that is also not working, if anybody have any solution for this please help me...
5
by: Maxwell2006 | last post by:
Hi, Can I have a breakpoint that stop execution as soon as any code change the value of a specific variable? Thank you, Max
1
by: thanawala27 | last post by:
Hi, I wanted to append a cell of an Excel file. Basically, the excel file is not taking more than 256 characters for a cell at a time. So i thought of breaking the varaible into 2. n copying it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.