Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1048083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:24:04+00:00 2026-05-16T16:24:04+00:00

I have created a VB.NET 2008 Class Library that has, for the most part,

  • 0

I have created a VB.NET 2008 Class Library that has, for the most part, been working quite well with VBA. I can perform most of the functionality that is required but I have recently run into a pretty severe problem.

The reason we are working with both programming interfaces is because we need to be able to do “on the fly” coding and that can only be accomplished in VBA. So, as I mentioned, there is “backbone” code in .NET. The .NET code contains arrays, fields, properties, etc. (your typical program structure). My problem is the arrays.

Alright, in the .NET DLL I have an array – let’s call it X() as Double. There are two properties since VBA doesn’t support overloading. One is: X(rowNum) as Double, and the other is: X() as Double(). Notice the first property returns only one element of the array while the latter returns the entire array.

In my VBA program I can read a file and fill this array with values (this is all in the DLL). However I can’t manipulate those same values once inside VBA.

For instance, in VBA I cannot say X(5) = 10. It won’t change the value. When I try setting the entire X() array to another I get the Compile Error: Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T16:24:05+00:00Added an answer on May 16, 2026 at 4:24 pm

    Instead of manipulating the array directly with eg X(5) = 10, you might have more luck creating get/set type methods. Check here for some examples.

    Public Sub SetX (ByVal i As Integer, ByVal v As Integer)
        X(i) = v
    End Sub
    
    Public Function GetX (ByVal i As Integer) As Integer
        Return X(i)
    End Function
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a C# (2008/.NET 3.5) class library assembly that supports WPF (based on
I have a VB.NET project in Visual Studio 2008 that I created a specialized
I have a class library project for .NET 3.5 built with Visual Studio 2008.
I have created an ASP.NET class derived from the standard WebControls.TextBox , with the
I have created several DLL (.NET) libraries that are used in several projects. In
Good Morning, I have created an ASP.NET 3.5 webform that allows users to search
In Visual Studio 2008 I have a Class Library project (called Media ) to
I am experiencing some annoying behavior with Visual Studio .NET 2008. We have created
I created a C#.net app that uses dates from a SQL Server 2008 database
I am using VS 2008. I have created a new Asp.net web site project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.