Bizarre problem: VBA code not responding to changes :: no lo

Brian

Board Regular
Joined
Apr 24, 2002
Messages
113
I'm stumped.

A bug appeared in my code that had been working properly for months. To troubleshoot, I added a message box in the appropriate place (to display data) but it never appeared.

So I tried editing existing message boxes and Application.StatusBar messages, but the changes did not appear! So I searched the entire Project (yes, I clicked the correct radio button)for the phrase and individual key words in the messages and they only appear in the location that I edited.

I'm using Excel 97 SR2 on WinNT 4.0

Has this ever happened to anyone?

Any suggestions?

Thanks,

Brian
This message was edited by brian on 2002-09-11 13:39
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi Brian,

There are several possibilities that you should at least check.

1. Is it possible that your code is not even running? If you code is triggered by an event routine, then you should make absolutely sure that event handling is turned on using

Application.EnableEvents = True

You can just run this line of code in the VBE immediate pane.

2. Has screen updating been turned off? If so it can be turned back on with

Application.ScreenUpdating = True

3. you have an Exit statement someplace in your code. An Exit will cause the program to stop at that point and not continue with any calling routines.


If none of these seems to be the culprit you should set a breakpoint at your first executable line of code, then run your code and single step from the breakpoint to determine if there is a particular place in your code where the source code tracing stops. This can happen if the code gets interrupted by an event that is triggered by something the code does. For example, if your code modifies a worksheet cell, and you have a worksheet dependency on this cell, then this will trigger a worksheet Calculate and it could be some worksheet formula that then gets called and if this formula has a problem in it the type of symptom you describe could occur.

I hope this helps.

Damon
 
Upvote 0

Forum statistics

Threads
1,223,459
Messages
6,172,340
Members
452,454
Latest member
MadamRedRabbit

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top