Zip code distance?

jigax

Active member
Joined
Aug 17, 2006
Messages
43
Programming Experience
Beginner
Hello everyone,

I have an excel sheet that contains a list of zip codes with latitude and longitude. I want to create a UDF in excel taht will calculate the distance between two zip codes.

I have the formula to calculate the distance my problem is I'm not sure how to have a UDF look in another sheet or file for the latitude and longitude of the zip codes specify.

for examply lets say if i call my function distance then i would type something like this on the cell i want to get the distance "=distance(zipcode1,zipcode2)"
 
How is this related to VB.NET ? If it is at all then you may want to explain more, if not then I can delete the thread for you.
 
You can create class library projects with VB and export them for COM, then reference and call them from VBA, but to call a function in a cell you have to write a VBA function.
 
What section would that be? There are no VBA forums here.
 
VBA is not trash, but it is not VB.Net. VB.Net Forums is a VB.Net community. There exists many VBA communities out there. There are many similarities between all Basic based languages, as there are many similarities between all programming languages. In terms of language development and features VBA is way old, though. VB today is also closely tied with the .Net library, something that is not available directly from VBA. So VBA and VB.Net are really worlds apart.
 
John,

Sorry for the confusion I didn't mean to say VBA is trash. I meant that you could delete the thread since this is not a VBA forumn.
 
I don't think that is necessary, there is useful information in this thread about how things work, for other people to read also. Others may add valuable input later also, you never know.
 
Back
Top