Wherre best to place code
I have an excel workbook that uses active -x controls. It allows the user to model the performance of a micro-scale wind turbine (small device that fits onto a rooftop). I have VBA code that is located for each worksheet, some that is contained in Forms and other code that is located in modules. My question is: in terms of keeping the workbook small and running quickly is it Ok to have code for each worksheet or place it in modules? thanks, luke -- luke ------------------------------------------------------------------------ luke's Profile: http://www.excelforum.com/member.php...o&userid=21401 View this thread: http://www.excelforum.com/showthread...hreadid=397790 |
It is best to think of it from a perspective of the workbook design as to
where you should put it. Some code has to go in the worksheet or userform, event procedures associated with those objects, but where you put any code that might be called from those procedures is a design issue. It probably will not make much difference in terms of size and efficiency. -- HTH RP (remove nothere from the email address if mailing direct) "luke" wrote in message ... I have an excel workbook that uses active -x controls. It allows the user to model the performance of a micro-scale wind turbine (small device that fits onto a rooftop). I have VBA code that is located for each worksheet, some that is contained in Forms and other code that is located in modules. My question is: in terms of keeping the workbook small and running quickly is it Ok to have code for each worksheet or place it in modules? thanks, luke -- luke ------------------------------------------------------------------------ luke's Profile: http://www.excelforum.com/member.php...o&userid=21401 View this thread: http://www.excelforum.com/showthread...hreadid=397790 |
cheers, it was the size and efficiency I was concerned about. What code i have appears quite neat and easy to understand. Luke -- luke ------------------------------------------------------------------------ luke's Profile: http://www.excelforum.com/member.php...o&userid=21401 View this thread: http://www.excelforum.com/showthread...hreadid=397790 |
All times are GMT +1. The time now is 10:16 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com