Solved

Copying arrays

Posted on 1998-06-27
1
138 Views
Last Modified: 2010-05-03
Is there any command used to copy arrays?  Like in HP BASIC you can use a MAT Array_a = Array_b. I would prefer not to use a for..next loop to go through each element and copy them.
0
Comment
Question by:willmrk
1 Comment
 
LVL 2

Accepted Solution

by:
lmorris earned 50 total points
ID: 1464444
This is where a variant comes in real handy. Here is an example of how to copy an array:

Private Sub Command1_Click()
    Dim aArray
    Dim aArray2
   
    ReDim aArray(0 To 10, 0 To 10)
   
    Dim i As Integer
    Dim j As Integer
   
    For i = 0 To 10
        For j = 0 To 10
       
        aArray(i, j) = i * j
       
        Next j
    Next i
   
    aArray2 = aArray
End Sub

0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now