Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

function calling value from another function

Status
Not open for further replies.

jbanas

Programmer
Sep 18, 2007
18
US
i have a function that is going calculating the distance between two locations using the latitude and longitudes for two points assuming the earth is flat and the lat and long are perpendicular. I called that function distance. My issue in moving forward is taking the distance i am given from this the function distance and bringing it into another function i call function wp. I would like to say if the distance is less than 300 then calculate this formula or if it is less than 500 calculate another. I am having issues with my second function calling the distance value.

Any help would be great
 
Set your second function with a argument or paramater

Set your function as public

Public Function wp(val)

and from your first function just write

wp(val) val represnts the distance

and then manipulate val in your wp function

 




jbanas,

Is there any reason that you did not include the code showing the way you are calling one function from another.

Just maybe, perhaps, peradventure, it might help getting YOU the help you requested.

Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top