Passing variables to a module and back

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a module that finds the correct exchange currency rates. It will be
called from many forms. It is a function and I need to pass data to the
function, and I need the correct exchange currency rate passed back.
Here is the call:

GetExchangeRate (dRate), (sISO), (dtImportDate)

and the Definition for GetExchangeRate looks like this:

Public Function GetExchangeRate(dRate As Double, sISO As String,
dtImportDate As Date)

In the GetExchangeRate function I am setting DRate to the correct rate, but
when I come back to the sub where I initially called the GetExchangeRate the
dRate is still 0.

What am I missing?

Thanks so much and I hope this question isn't too confusing! :)

Thanks!

Janis
 
In the code that calls the function, do you have a
Dim dRate As Double
statement?

Post the code that contains the call to the function.
 
Thanks for input - it is figured out - I needed to add CALL to the function -
Call GetExchangeRate (dRate,sISO,dtImportDate).
Thanks so much!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top