I am gettin an error, and I don't know why. Here is my code:
'this is where I set the values for my array. This is working fine.
arrCabinetState(1) = myvalue1
arrCabinetState(2) = myvalue2
arrCabinetState(3) = myvalue3
arrCabinetState(4) = myvalue4
arrCabinetState(5) = myvalue5
arrCabinetState(6) = myvalue6
arrCabinetState(7) = myvalue7
'Now I want to add this array to a collection
colCabinetState.Add Item:=arrCabinetState, key:=CStr(lngRxTrxID)
'Now I want to access this array in the collection in another sub
private sub myFuntion(MyValue7 as String)
Dim index as String
Set arrCabinetState = (colCabinetState.Item(MyValue7))
Seems to me you are accessing your collection wrong. Is the point of having a collection to put more than one array into it keyed by lngRxTrxID?
If so, then create a new project, add one command button
Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.
While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC. I didn't post completely correct code o…
Here are a few simple, working, games that you can use as-is or as the basis for your own games.
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…
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.