View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tushar Mehta Tushar Mehta is offline
external usenet poster
 
Posts: 1,071
Default separate modules for each sub routine?

Yep. I prefer chocolate with nuts, preferably almonds or pecans. {g}

Logical organization is what I use. One module manages menus. That
also makes it trivial to copy it to another add-in. One module
includes all publicly exposed subroutines (typically, associated with
menu items / command bar items). If the add-in is large, I might have
individual modules each of which provides some functional capability.

Of course, some modules / code placements are dictated by language
requirements. For example, even if a functional capability requires 2
or more classes, I am forced to create separate class modules rather
than put them in a single project 'block.'

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
I'm looking for feedback on whether or not to create separate modules for
each sub-routine and function, or to combine them in them in single modules
(where it makes sense). I realize this may be like asking what is the
"best" flavor of ice cream, but I'm curious to hear what reasons people
have for their preference on this matter.

Thanks for your interest and opinions.

Smokii