View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected][_2_] hmiller@hartford.edu[_2_] is offline
external usenet poster
 
Posts: 3
Default Concatenate Variables

Hey folks,

I'm wondering if you could help me out here. My overall goal is to loop
through a set of string variable that I have defined in my code, and
display these strings on a worksheet. Something like this:

Dim hello1 As String
Dim hello2 As String

Hello1 = "Hey"
Hello2 = "What's Up"

For i = 1 to 2
Sheets(1).Cells(1, i).Value = Hello & i
Next i

If you know of another way to loop through variables stored in code I'm
all ears. I'm new to all this.

Thanks in advance,

HMiller