Message 1 of 2
Userform Code vs Module Code
Not applicable
01-24-2005
06:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am pretty new to VBA, and am trying to wrap my head around the whole concept of userform vs module coding
I have created a userform and coded the relative userform events. I have also created a module, and called a procedure to initialise the userform. Within this module, i have additional sub procedures for data processing.
I would prefer to code in separate modules, and have them referenced by the main userform, however, I notice that when I go to run the macro, I get the option of running all the procedures (if they are declared public). When I change the sub procedures to 'Private', they cannot be reference from the userform code.
Am I missing something here?
Is it possible to have multiple sub procedures and modules within a program that are not contained within the userform code module, and are also hidden from the end user when they run the macro from the Visual Basic Manager?
Thanks in advance
AM
I have created a userform and coded the relative userform events. I have also created a module, and called a procedure to initialise the userform. Within this module, i have additional sub procedures for data processing.
I would prefer to code in separate modules, and have them referenced by the main userform, however, I notice that when I go to run the macro, I get the option of running all the procedures (if they are declared public). When I change the sub procedures to 'Private', they cannot be reference from the userform code.
Am I missing something here?
Is it possible to have multiple sub procedures and modules within a program that are not contained within the userform code module, and are also hidden from the end user when they run the macro from the Visual Basic Manager?
Thanks in advance
AM