Writing data to an Array - Array Help

VenturSum

Board Regular
Joined
May 23, 2010
Messages
138
Hi all,

I'm still getting used to working with arrays and could use a bit of guidance.

---
I want to store up to 16 values in a 1 dimension array.
These will be column names: "A", "Z", "CC" et cetera.

---
I'm defining the array as:
Dim ArrCol(1 To 16) As String


The column names are from a combo box on a user form
and I need some way to add the data to the array.

If ComboBox01.Value <> "" Then
>> Add Data to array <<
End If


any thoughts if I'm doing this correctly or better??

Thank you,

John,
In Annapolis, MD
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi John

There's nothing wrong with what you have. How are you keepng track of the array elements you have populated (eg a counter perhaps from 1 to 16)?
 
Upvote 0
Firefly,

I figure it out just as I give up and ask !!
go figure.

Here is how I'm adding the data:
If cbx01.Value <> "" Then ArrCol(1) = VBA.UCase$(cbx01.Value)
If cbx02.Value <> "" Then ArrCol(2) = VBA.UCase$(cbx02.Value)


Thank you,
John
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top