Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Accessing Global info from usercontrol

Posted on 1998-09-14
3
Medium Priority
?
157 Views
Last Modified: 2010-04-30
I have a very simple usercontrol sitting on a form. The form code contains an array of strings ie. Dim MyArray(0 to 100). How can my usercontrol obtain that array information, it just wants to read it and check it is OK.
I tried using usercontrol.parent.Myarray but got an error message.
0
Comment
Question by:entretec2
[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
3 Comments
 

Expert Comment

by:wiltonk
ID: 1434666
I don't think you can do this directly.

I suggest you add a Procedure in the UserControl(i.e. Sub) to pass the array in/out the UserControl.

e.g.
Public Sub SetArray(MyArray())
..
End Sub

Public Sub GetArray(MyArray())
..
End Sub
0
 
LVL 13

Accepted Solution

by:
Mirkwood earned 300 total points
ID: 1434667
Put Public in front of the definition

Public MyArray (0 to 100) as Variant
0
 

Author Comment

by:entretec2
ID: 1434668
A stupid mistake on my part
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

618 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