Loss of Public Variable values with VBE open

argenta

Board Regular
Joined
Jan 10, 2004
Messages
60
I've noticed that when I run an application with the VBE open the values in Public Variables tend to get lost.

This can be very disconcerting until you realise the cause.

Can anyone explain to me why this happens?
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Can you explain in more detail - I have never come across this problem. Always need the VBE open during development.

What Excel version ?
 
Upvote 0
Hi;
To my knowledge this could happen if a macro, for one reason or another, is stopped.
e.g. if you stop voluntarily the macro or if there is a bug that stops the macro in debugging mode.
 
Upvote 0
I'm running Excel 2002 SP3.

The problem doesn't only arise when a macro stops for some reason.

I have a scheduling application which holds a number of data elements in arrays. As the schedule is manipulated the arrays get updated.

If I do this with the VBE open, after one action the at least one of the arrays holding the data is empty and so the schedule is lost. Doing the same thing with the VBE closed it wroks perfectly.
 
Upvote 0

Forum statistics

Threads
1,215,110
Messages
6,123,140
Members
449,098
Latest member
Doanvanhieu

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