alright thanks, but just one last bit i still don't quite get
with
Temp = Temp & " # " & MyArray(i)
So we first have when i = 0 MyArray(0) = 0
So Temp is now (empty string) # 0
then we have i = 1 then MyArray(1) = 1 that means:
Temp is now (empty string) # 1
Then when MyArray(2) = 4
we have Temp is now (empty string) # 4
and so on.
So I'm assuming (empty string) doesn't show, ie, it's just a blank. So shouldn't the image be:
#0#1#4#...
But it is displayed as 0#1#4#...
[Ie, the difference is that I wudda thought it began with a # but it doesn't?]
I know it's pretty trivial but ....
Sub ArrayDemo1()
Dim MyArray(5)
Dim i As Integer
Dim Temp As String
For i = 0 To 5
MyArray(i) = i * i
Next i
Temp = “”
For i = 0 To 5
[b]Temp = Temp & # & MyArray(i)[/b]
Next i
MsgBox Temp
End Sub
For laseredd: The bolded part [ehhh, never knew couldn't bold in code quote, it's the line with around it ;P] is what I wudda thought should be written as, ie, the # without the " " around it, however when I run the macro VBA says "syntax error" so I'm assuming the " " has to be around the #. Cthulhu said it was because # is a string and strings when connected by & needs a " " around it, but variables when connected with & do not need a " " around it, this makes sense as it coincides with the examples I've seen so far, what do you think of it?