Pandab2002
IS-IT--Management
I have the following procedure as part of a larger procedure:
Dim content(18) As String
Dim c(18) As String
z = 18
For j = 1 To z
Windows(sName3).Activate
content(z) = Cells(j, i)
Cells(j, i).Activate
If content(z) = "" Then
Cells(j, i).Select
Else
Msgbox Content(z)
End If
c(z) = ActiveCell.Offset(0, 1)
Next j
How do I use the arrays. For example, can I later use content(10) or c(5)? When I add Msgbox content(5) outside of the for/next statement, it is blank, but if I add Msgbox content(z) in between the for/next, it returns the correct string. I want to be able to use all 18 of the content and all 18 of the c strings.
Dim content(18) As String
Dim c(18) As String
z = 18
For j = 1 To z
Windows(sName3).Activate
content(z) = Cells(j, i)
Cells(j, i).Activate
If content(z) = "" Then
Cells(j, i).Select
Else
Msgbox Content(z)
End If
c(z) = ActiveCell.Offset(0, 1)
Next j
How do I use the arrays. For example, can I later use content(10) or c(5)? When I add Msgbox content(5) outside of the for/next statement, it is blank, but if I add Msgbox content(z) in between the for/next, it returns the correct string. I want to be able to use all 18 of the content and all 18 of the c strings.