troubleshooting Question

Variablentransfer within a class module and form

Avatar of themroc
themroc asked on
Visual Basic Classic
6 Comments1 Solution171 ViewsLast Modified:
I have got a dll project which consists of a class module (cClass) and a form (formdll) (Modal)

In class Module I have got a public subroutine:

Public sub graph(x,y,z....)

This subroutine  does some basic calculations and populates an X;Y graph on the form.

I invoke this by Calling this subroutine from the server application
Call graph(X,Y,Z...)

As a result the graph is redrawn and everything works fine.
Now my Problem.
The form (formdll) needs to be modal and after I call the subroutine graph the focus is on this form.

In order to redraw the graph in a different scale I would like to use the variables (X,Y,Z...) again but they are out of scope by now.
So in essens I need to be able to recall the subroutine graph(X,Y,Z...) from the form with the same variables as from the server application.

One way would be to make all the different variables public wityhin the class module, but I would like to avoid this.

I hope the problem is understanable?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros