Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

??? about arrays

Status
Not open for further replies.

Pandab2002

IS-IT--Management
Apr 16, 2003
47
US
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top