• What are the references to vb.net?

    Author
    Topic
    #466106

    im writing code in VBA and want to reference .VB.net code.

    I actually want to use the following .net syntax

    DataList.Sort()
    DataList.Reverse()

    I understand I need to hook into and reference .net however I dont know which reference it is under the Code editor menu
    Tools, References…

    note: ive .NET installed on my pc

    many thanks

    diana

    Viewing 3 reply threads
    Author
    Replies
    • #1206591

      Diana,

      As far as I know (which is just based on some quick googling), you can’t access .NET per se, directly from VBA. You can call a .NET assembly or library from VBA, but you will need Visual Studio to set that up.

      A Google search on “calling .net from vba” will bring up a bunch of references. One example that looks good is this example from CodeProject.com.

      Gary

    • #1206596

      Before you dive into the intricacies of using a .NET application from within VBA: could you tell us what is is you are trying to achieve? Chances are very good that your problem has already been addressed.

    • #1206851

      im currently coding in VBA
      and I want to use the following .NET syntax

      DataList.Sort()
      DataList.Reverse()

      dd

      • #1206875

        im currently coding in VBA
        and I want to use the following .NET syntax

        DataList.Sort()
        DataList.Reverse

        What do you want to sort?
        I’m positive there are much simpler and more efficient ways to do a sort in VBA than by using .NET code.

    • #1206870

      Setting up .NET with VBA adds an extra layer of overhead that may not necessarily improve the overall responsiveness of other areas of your code.

      What we are trying to say is that efficient functionality for Sorting & Resorting DataLists already exists in VBA. What is it about the .NET functionality that makes DataList.Sort() & DataList.Reverse() that much more attractive than VBA?

    Viewing 3 reply threads
    Reply To: What are the references to vb.net?

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: