What is 'Design Mode' and 'Exit Design Mode' for?

What is 'Design Mode' and 'Exit Design Mode' for?

Anonymous
Not applicable
556 Views
3 Replies
Message 1 of 4

What is 'Design Mode' and 'Exit Design Mode' for?

Anonymous
Not applicable
Under the Run menu of the VBA editor there is the 'Design Mode'/ 'Exit Design Mode' menu item. What is that for?
0 Likes
557 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
RTFM...

Turns design mode on and off per project. Design mode is the time during which no code from the project is running and events from
the host or project will not execute. You can leave design mode by executing a macro or using the Immediate window.
Design Mode Command

Turns design mode on and changes to Exit Design Mode.

Exit Design Mode Command

Turns design mode off and clears all module level variables in the project.


--
Matt W
"What the flip was Grandma doing at the sand dunes?"
0 Likes
Message 3 of 4

Anonymous
Not applicable
In strait Visual Basic, this is pretty simple: Eighter you are in execution or in design.

In VBA, things are a bit different. Since VBA is an "in-process" extention to a program (thus uses the same memory space as the application) one could say that VBA programs are alwaise runing. The best exemple of this is that in VBA, the immidiate window works all the time. Public variables are accessible at anytime once you have written the line that declares them.

In this case, Design mode is entered and exited as actions in the VBA editor. This means that when doing changes to your VBA project, you are temporarly in design mode. Once you execute anything, use a macro or the immidiate window, you instantly exit design mode.

In other words, VBA enters Design mode for all changes made, and exits it at all other time.

To conclude, in VBA, it is a button/function that tells you if your variables are "alive" (not in design mode) or "dead" (design mode).

I know this is not as clear has I would have liked it to be, but its a try... Hope this helps.
0 Likes
Message 4 of 4

Anonymous
Not applicable
And Matt... unless you are an experienced programmer, the manual's explaination is kinda foggy. It just doesn't explain what the design mode is......
0 Likes