surya prakash
08-27-2007, 11:11 PM
Hi,
I am using following sub; I am not able to generate all elements;
Guess I missing outer-loop;
will appreciate any feedback...
Public Sub GenerateBU()
' Row x column
Dim m As Integer, n As Integer
Dim arr_Fla_wid() As Integer
ReDim arr_Fla_wid(11)
arr_Fla_wid(1) = 130
arr_Fla_wid(2) = 150
arr_Fla_wid(3) = 180
arr_Fla_wid(4) = 200
arr_Fla_wid(5) = 220
arr_Fla_wid(6) = 250
arr_Fla_wid(7) = 300
arr_Fla_wid(8) = 350
arr_Fla_wid(9) = 400
arr_Fla_wid(10) = 450
arr_Fla_wid(11) = 500
Dim arr_Fla_thk() As Integer
ReDim arr_Fla_thk(7)
arr_Fla_thk(1) = 6
arr_Fla_thk(2) = 8
arr_Fla_thk(3) = 10
arr_Fla_thk(4) = 12
arr_Fla_thk(5) = 14
arr_Fla_thk(6) = 16
arr_Fla_thk(7) = 20
Dim count As Integer
For m = 1 To UBound(arr_Fla_thk)
For n = 1 To UBound(arr_Fla_wid)
Cells(n, 7) = arr_Fla_thk(m) & "x" & arr_Fla_wid(n)
Next
Next
MsgBox "Data Updated"
End Sub
I am using following sub; I am not able to generate all elements;
Guess I missing outer-loop;
will appreciate any feedback...
Public Sub GenerateBU()
' Row x column
Dim m As Integer, n As Integer
Dim arr_Fla_wid() As Integer
ReDim arr_Fla_wid(11)
arr_Fla_wid(1) = 130
arr_Fla_wid(2) = 150
arr_Fla_wid(3) = 180
arr_Fla_wid(4) = 200
arr_Fla_wid(5) = 220
arr_Fla_wid(6) = 250
arr_Fla_wid(7) = 300
arr_Fla_wid(8) = 350
arr_Fla_wid(9) = 400
arr_Fla_wid(10) = 450
arr_Fla_wid(11) = 500
Dim arr_Fla_thk() As Integer
ReDim arr_Fla_thk(7)
arr_Fla_thk(1) = 6
arr_Fla_thk(2) = 8
arr_Fla_thk(3) = 10
arr_Fla_thk(4) = 12
arr_Fla_thk(5) = 14
arr_Fla_thk(6) = 16
arr_Fla_thk(7) = 20
Dim count As Integer
For m = 1 To UBound(arr_Fla_thk)
For n = 1 To UBound(arr_Fla_wid)
Cells(n, 7) = arr_Fla_thk(m) & "x" & arr_Fla_wid(n)
Next
Next
MsgBox "Data Updated"
End Sub