I followed this post in order to return two values from a function: http://www.geeksengine.com/article/vba-function-multiple-values2.html
Here is the code I used:
Any ideas what I'm doing wrong?
This is the error I get when the code tried to call the function call:
Here is the code I used:
Public Type Waypoint
Lat As Double
Lon As Double
End Type
Dim LatLon As Waypoint
LatLon = UTMToLatLon("N", 17, 534150, 4836410) 'Run-time Error error '6' when this line runs
Function UTMToLatLon(Hemisphere As String, Zone As Integer, Easting As Integer, Northing As Integer) As Waypoint
Dim LatLon As Waypoint
LatLon.Lat = 43.679919
LatLon.Lon = -80.576323
UTMToLatLon = LatLon
End Function
Any ideas what I'm doing wrong?
This is the error I get when the code tried to call the function call:
Last edited: