Locked How to use the functions of OWC in VB 2010

  • Friday, February 03, 2012 3:38 PM
     
     

    Hi,

    The code "application.average(1,2,3)" from OWC in VB6 works well, but I am wondering that how to use the function of OWC in VB 2010. Thanks!

All Replies

  • Tuesday, February 07, 2012 6:35 AM
    Moderator
     
     Answered Has Code

    Hi Sir,

    Welcome to the MSDN Forum.

    Actually, this statement "application.average(1,2,3)" can work in VBA, rather than VB6.

    Anyway, you can try this way to get the average:

            Dim intArray() As Integer = {1, 2, 3}
            Console.WriteLine(intArray.Average)
    
            Dim abc As Integer = {1, 2, 3}.Average
            Console.WriteLine(abc)
    Best regards,

    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.