shabbyporpoise
New Member
- Joined
- Jul 22, 2011
- Messages
- 26
Hello Forum
I'm attempting to develop a vba program that will create an over-arching array that loops and creates other arrays along the way. The end goal is so that I can reference the cells in the arrays and compare them with other cells in the other arrays. I'm including the code that I have so far, any tips or starting points are welcome
Thanks Forum, any help is much appreciated
ShabbyPorpoise
I'm attempting to develop a vba program that will create an over-arching array that loops and creates other arrays along the way. The end goal is so that I can reference the cells in the arrays and compare them with other cells in the other arrays. I'm including the code that I have so far, any tips or starting points are welcome
Code:
Option Explicit
Sub mainFireWall()
Dim num As Integer, names As String, i As Integer
Dim colCount As Variant, rule()
Dim col As Integer
Dim row As Integer
Dim rowCount As Integer
row = 1
i = 1
num = InputBox("how many rules are in this document?")
For rowCount = 1 To num
Do Until IsEmpty(Cells(row, i))
ReDim Preserve rule(1 To i)
rule(i) = Cells(1, i).Value
i = i + 1
Loop
row = row + 1
MsgBox rule(3) 'I'm using this as a test
Next rowCount
End Sub
ShabbyPorpoise