[thelist] vb help with array

Heather Welsh hbwelsh at yahoo.com
Tue Mar 1 09:58:34 CST 2005


I have a for loop that will count my rows and stop on
the row stated.
I have an if statmendt to test if there is a blank
line.
I would like to use an array that will hold a set of
numbers and when my if statment verifys a blank line
it will incress my array to the next value in it. 

1. how do i do this. so far everything i can think of
for looping the array dose not allow me to move on to
the next row.

2 can i use a mulitdimensional arry i have 4 things
that need to be changed when i reah the blank line. 

here is the code i have now:

' Remimber RowMax is equal to total number of rows in
the sheet
' Dont forget to set RowMax to the total number of row
in the worksheet
' Don't forget to set what number row you are staring
on (For rownum = ? to RowMax)

'******************** COLUM DECLERATION
********************

Const RowMax As Integer = 10
Const pos As Integer = 0

Const colMFGREF     As String = "A"
Const colMFG        As String = "B"
Const colNAME       As String = "C"
'Const colSmallImage As String = "D"
'Const colBigImage   As String = "E"
'Const colTKN        As String = "F"
'Const colGP         As String = "G"
'Const colPARTNUMBER As String = "H"
Const colShortDes   As String = "I"
'Const colLongDes    As String = "J"
'Const colCost       As String = "K"
'Const colSP         As String = "L"
'Const colLP         As String = "M"
'Const colShipWeight As String = "N"
'Const colCat1       As String = "O"
'Const colCat2       As String = "Q"
'Const colCat3       As String = "R"
'*********************************** END COLUM
DECLERATION ************************************
'*************************************** START WEB
FILE ***************************************
'** DONT CHANGE ANYTHING ABOVE HERE **

Sub WEB()



    Dim MFG(1) As Integer
    MFG(0) = "123"
    MFG(1) = "456"
    
    Dim i As Integer
       
    Dim sMFG As Integer

    
For rownum = 2 To RowMax
emty = Cells(rownum, colNAME).Value
    If emty = vbNullString Then
       If Arr(i).Value = 0 Then
        x = x + 1
        MFG(x) = Arr(i).Value
        Cells(rownum) = rownum + 1
    Else
        Cells(rownum, colMFG) = MFG(i)
        Cells(rownum, colShortDes) = "here we are"
     End If
Next rownum
  
End Sub

thank you for your time 

=====
Heather Welsh


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Sports - Sign up for Fantasy Baseball. 
http://baseball.fantasysports.yahoo.com/


More information about the thelist mailing list