ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Design Best Practices: Form Control Code in Worksheet or Module (https://www.excelbanter.com/excel-programming/319497-design-best-practices-form-control-code-worksheet-module.html)

Bing

Design Best Practices: Form Control Code in Worksheet or Module
 
Which is best practice: Code for handling clicking of clicking of Form Button
on the worksheet where Button is placed, or in standard module? Both seem to
work but former approach seems to be more logical.

Rob van Gelder[_4_]

Design Best Practices: Form Control Code in Worksheet or Module
 
Personal choice really...

If I think it's possible the logic might be used elsewhere, it goes into a
standard module.

I don't mind leaving small code bits in a worksheet, but if it gets more
than a couple of pages long I'll break it into a subroutine or function for
a standard module.

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Bing" wrote in message
...
Which is best practice: Code for handling clicking of clicking of Form
Button
on the worksheet where Button is placed, or in standard module? Both seem
to
work but former approach seems to be more logical.




Tom Ogilvy

Design Best Practices: Form Control Code in Worksheet or Module
 
If you can't define the routine by selecting it from the dropdowns at the
top if the module (sheet module), then in general, it should go in a
standard module.

--
Regards,
Tom Ogilvy


"Bing" wrote in message
...
Which is best practice: Code for handling clicking of clicking of Form

Button
on the worksheet where Button is placed, or in standard module? Both seem

to
work but former approach seems to be more logical.





All times are GMT +1. The time now is 07:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com