jonathanchye
Registered User.
- Local time
- Today, 09:28
- Joined
- Mar 8, 2011
- Messages
- 448
Tidying up code - Sub procedures
I am creating a lot of custom procedures used only in one main form. Right now what I am doing in the VBA editor is Insert > New Procedure.
Edit: tidied up post to make my question clearer
This inserts a new private Sub Procedure at the bottom of the General section of my Form's class object. This is fine for short codes but some of my sub procedures have over 50 lines.
If there a better way to organise my code? Most of my code are only used locally to update textboxes after doing some calculations hence a lot of my code looks like the line below:
I tried creating a new module and pasting my sub procedure codes in but I get errors saying "Invalid Outside parameter".
I am creating a lot of custom procedures used only in one main form. Right now what I am doing in the VBA editor is Insert > New Procedure.
Edit: tidied up post to make my question clearer
This inserts a new private Sub Procedure at the bottom of the General section of my Form's class object. This is fine for short codes but some of my sub procedures have over 50 lines.
If there a better way to organise my code? Most of my code are only used locally to update textboxes after doing some calculations hence a lot of my code looks like the line below:
Code:
Me.myFormName.txtTextBox1 = somecalculated value
Last edited: