Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Is it possible to place a form procedure in a module.

I have a procedure which is called from multiply forms and instead of putting it on every form would like to centralise the procedure and place the code ni a module.

 

I have tried starting the procedure with "Public Function" and "Private Function" but to no avail.

 

Any help is appreciated.

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

-- Rick Cook, The Wizardry Compiled

  • Administrators
Posted

Not 100% sure what you mean by a 'form procedure' but you can put any sub or function in a module and call it from a form.

It may help if you posted a bit of code....

Also you may want to look at using a class with a shared method rather than a module just to keep things a bit more OO

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

Thanks PlausiblyDamp,

 

I found were I was going wrong. I was placing my procedures outside of the module area. I will have a look into creating a class.

 

You don't happen to know of any websites of the top of your head?

Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

-- Rick Cook, The Wizardry Compiled

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...