I'd like to retrieve information from using the following syntax.
SELECT something, elsething FROM dbo.table WHERE something = 3
This will give me exactly two elements. What i'd like the computer to do is to only return that value as a function. So, i've got something like this.
[vba]Private Function GetSome (ByVal parameter As Long) As Long
Dim strSQL As String
strSQL = "SELECT something, elsething FROM dbo.table WHERE something = " & parameter
GetSome = ??? ' here, i need some help returning the valu of "elsething" ONLY
End Function[/vba]
Is this doable in Excel? How?