Quantcast
Channel: Product Communities
Viewing all articles
Browse latest Browse all 105279

Forum Post: Re: Questions About MVBA Development Environment?

$
0
0

[quote user="BE_Follower"]MVBA adds its own generated code every time I run my code.  Example is this simple (draw line) code.  MVBA Added the last 6 lines[/quote]

When you record a VBA macro, the recorder adds boiler-plate code such as those lines & comments.  Otherwise, VBA doesn't interfere with what you write.

[quote user="BE_Follower"]What is the best way to organize my MVBA code? Should I place all codes in one big Module or smaller ones?[/quote]

What is 'big'?

The first step in organising code is to break it down into easily-digestible chunks.  An easily-digestible chunk is a procedure (subroutine or function) that occupies no more than a screen in your text editor. A module can hold multiple procedures.

Once you've developed a few VBA projects, you're likely to find yourself writing similar-looking code several times over.  When you realise that you have reached that point is the time to move the similar code chunks to a new module.


Viewing all articles
Browse latest Browse all 105279

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>