Pass variable value back to form from module 
Author Message
 Pass variable value back to form from module

Greetings,

I have a program that has 1 form on it.  The user fills out the form and
then clicks,
which starts a module.  The module creates a directory -- then the program
shells to
an imaging software package.  When the user is finished scanning images,
they
close the imaging shell and return to my form.

There is a message box telling them that the shelled program is over.  Now,
when
they click the ok in this message box, I want to change the name of the
directory
that was created in the module.

I've tried global variables, etc. and I continue to get run-time errors
unless I have
my variable local in the procedure.

Is there some way of passing variables when the program is running from the
module to the form?

Thanks for the help,
Shawn Pursley



Sun, 03 Jun 2001 03:00:00 GMT  
 Pass variable value back to form from module
One way to do this is to treat the form like a class, and add a property
procedure to the form. Then set the property on the form from the module. It
would work something like this:

'in the form (Form1)
private m_sDirectory as string

public property Directory(DirToSet as string)
    m_sDirectory = trim$(DirToSet)
end property

'in the module
' ... do your thing, when done,
Form1.directory = sDirectory    'set the property on the form from local
directory name

Hope this helps.
Stan

Quote:

>I've tried global variables, etc. and I continue to get run-time errors
>unless I have
>my variable local in the procedure.

>Is there some way of passing variables when the program is running from the
>module to the form?



Fri, 08 Jun 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. passing forms and controls so I can set focus back to a form from a module

2. passing forms and controls so I can set focus back to a form from a module

3. Passing input box value from Form Module to report module

4. Pass variable form module to a form

5. Passing value back to a calling form.

6. Passing value back to UserControl from a form

7. Passing variable from form to module??

8. Passing Value from Module Function to Form sub problem

9. assign value to variable in form module

10. Passing Variable Values to Forms

11. question about passing variables values from one form to other

12. Passing form values to other variables

 

 
Powered by phpBB® Forum Software