?
Solved

Vb Using Arrays in Fonctions

Posted on 2003-02-19
1
Medium Priority
?
123 Views
Last Modified: 2010-05-01
Hi experts
i got a function that as an array : sums(y)
Public Function test()


now i need to use that array in my other functions
how do i call it in

Public Function Separer()

thx
Itall

0
Comment
Question by:Italbro4
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 18

Accepted Solution

by:
bobbit31 earned 120 total points
ID: 7984469
Private Sub Command1_Click()
separer test()
End Sub

Public Function test() As String()
   Dim arrTest(1 To 5) As String
   Dim i As Integer

   For i = 1 To 5
      arrTest(i) = "Test" & i
   Next
   
   test = arrTest
End Function


Public Function separer(arrBlah() As String)
    Dim i As Integer
   
    For i = 1 To UBound(arrBlah)
        MsgBox arrBlah(i)
    Next
End Function
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month8 days, 8 hours left to enroll

764 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