?
Solved

Dynamically Add Global Array Items to Checklist in UserControl

Posted on 2013-02-05
1
Medium Priority
?
412 Views
Last Modified: 2013-02-09
I am planning on designing a UserControl with an empty checklist on it, compile the UserControl Library, and then at run-time spawn the UserControl and fill it with items from a globally declared array which will contain the data.

This would be called "dynamically filling a UserControl checklist", but the trick is compiling the UserControl Library in such a way to both (a) avoid compile errors, and (b) enable the checklist in the UserControl to fetch at run-time the array items from a globally declared array.
0
Comment
Question by:lep1
[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 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 1000 total points
ID: 38858457
Create a property in your UserControl to receive an array of the type you want to pass:

Public Property DataArray As String()

Simply set that property from the application:

Dim yourArray As String()
'Fill the array
yourUserControl.DataArray = yourArray

In the UserControl, simply use Me.DataArray to access the data in the array.
0

Featured Post

Independent Software Vendors: 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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

777 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