Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15908

Problem passing arrays from a basic module to a sub in a form

$
0
0
I am trying to pass two arrays from a sub in a VB6 basic module to a sub in the code section of a form that contains an MSChart control. Each array repesents a line and contains two columns for the X and Y points.

In the code section of the form that is to receive the arrays, I tried something like this:

Code:

Sub MakeDRchart(ChartPointsAc(), ChartPointsRe())
    Dim NfixedK as Long
    NFixedK = ubound(ChartPointsAc,1)
    For J = i To NfixedK
        Debug.Print J, ChartPointsAc(J,1)
    Next
End Sub

In the basic module where the arrays are created and sent from, I tried something like this:

Code:

Dim ChartPointsAc() As Double
  Dim ChartPointsRe() As Double
  ReDim ChartPointsAc(1 To nfixedk)
  ReDim ChartPointsRe(1 To nfixedk)
  Call MakeDRchart(ChartPointsAc(), ChartPointsRe())

How can I make this work?

Viewing all articles
Browse latest Browse all 15908

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>