Run a sub procedure

Leen

Registered User.
Local time
Today, 16:28
Joined
Mar 15, 2007
Messages
56
Hi,

I made a sub procedure where an input is requiered, example:
Code:
sub QChecks(layername)

I wanted to automate a proces, so the inputstring for the parameter layername is entered by a form.

To run the complete tool, I made a function in VB:
Code:
Function Qualitychecks()
QChecks(input)

So the "input" is entered in the form and using the function Qualitychecks, I can run subprocedure QChecks with this input.

However, I want to make the tool standalone, so that the form is not needed.
How can I get to this?

I'm looking for a way that a user can enter a string somewhere, and run the sub procedure in this string, without using the form.
Is this possible via a Query/via a Macro?

Becuase when using a macro, how can you run a sub procedure (I don't get the options), only function procedure are options when I use a "Runcode" in a macro..

Thanks for any help!!
Leen
 
You can move sub QChecks to a module. This will make it global.

You should really define what layername is i.e.:
Public sub QChecks(layername as string)
As presently it will be a variant (by default) but another developer won't have a clue what you are passing through.
 

Users who are viewing this thread

Back
Top Bottom