View Single Post
  #2 (permalink)  
Old November 29th, 2006, 07:45 PM
ef1196 ef1196 is offline
Authorized User
 
Join Date: Nov 2006
Location: , , USA.
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to ef1196
Default

Mike,

Here is one example using a module within your application:
Module mdlPublic

    '* Declare your structure PUBLIC to your application.
    Public Structure EmployeeInfo
        Dim FirstName As String
        Dim LastName As String
    End Structure

    '* This returns your structure as its return value.
    Public Function fncGetEmployeeInfo() As EmployeeInfo

        '* Create a local reference of your structure.
        Dim EmpInfo As New EmployeeInfo

        '* Here I'm just assigning values, but you
        '* could query a table for this info also
        '* as an example.
        With EmpInfo
            .FirstName = "John"
            .LastName = "Smith"
        End With

        '* Here you return the contents of the
        '* structure to your calling routine.
        fncGetEmployeeInfo = EmpInfo

    End Function

End Module




Best Regards,
Earl Francis
Reply With Quote