Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have
Private aAllCMDRows(1 To MAX_CMD_ROWS) As clsCMDdefn6A Private aAllMACRows(1 To MAX_WS_ROWS) As clsMACdefn6A Private aAllWSRows (1 To MAX_OP_ROWS) As clsWSdefn6A (and another two) Can I put these in another array: Private aAllArrays(1 To 5) using Const ID_CMD = 1 Const ID_MAC = 2 Const ID_WS = 3 aAllArrays(ID_CMD) = aAllCMDRows ' aAllArrays(ID_MAC) = aAllMACRows aAllArrays(ID_WS) = aAllWSRows I want to access them as follows: Dim oCMD As clsCMDdefn6A addToArray ID_CMD, oCMD Sub addToArray( iID As Integer, _ vItem As Variant ) Dim vArray As Variant ' ref to array? Set vArray = aAllArrays(iID) ' type mismatch vArray(1) = vItem End Sub But got the runtime problem in line 2. Thanks for your help, Peter. (It's for an Excel macro under XP) *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simply Array Formula? | Excel Discussion (Misc queries) | |||
Counting Array element | Excel Worksheet Functions | |||
Permutations of an array element < to a value | Excel Worksheet Functions | |||
Array element | Excel Programming | |||
deleting array element | Excel Programming |