I have my main program that will use a lot of functions so i wanted to put them all in a module. But i want the functions in the module to be able to interact with the objects on the form(i.e. command buttons)
How do i do this?
thanks
Printable View
I have my main program that will use a lot of functions so i wanted to put them all in a module. But i want the functions in the module to be able to interact with the objects on the form(i.e. command buttons)
How do i do this?
thanks
Create public methods in the module and call them from your
form(s) just as you would call any other method.
But i want the functions in the module to be able to interact with the objects on the form(i.e. command buttons)
right now i can't get them to do that.
Have you declared them as Public??
pass the controls you need as parameters to the routine.
I have made them public and i tried passing them. I can't seem to pass the right object(s). or maybe i am not declaring them right.
anyone got a bit of code to show?
You can do what Cander said or you can pass the form in.
It is nto letting me pass the controls or the form. Can some one give me an example since my intuative responses are not seeming to work. I tried passing me. but what do i make it in the fucntion declaration? Object? tried that.
I want to pass 4 command buittons in order to .enable = true them
See if this helps:
http://www.vbforums.com/showthread.p...hreadid=205998
That helps tremedoulsy and has the code xamples i needed.
thanks guys and if i still have problems i will shout back