Click to See Complete Forum and Search --> : for next loop
newatit
October 3rd, 2001, 09:15 PM
I'm new at this so please bare with me. I'm trying to create a program that when a button is clicked an angle will print out such as.
*
**
***
****
*****
and so on. I'm using for/next loops but can't seem to get it to print out right.
It's printing out like ******. Any suggestions?
srinika
October 3rd, 2001, 09:42 PM
Try this
Dim i as Integer
Dim s as string
s = ""
for i = 0 to 5
s = s + "*"
Debug.print s
next i
Cakkie
October 4th, 2001, 01:16 AM
for T=1 to 5
Debug.print Replace(Space(t)," ","*")
next T
Tom Cannaerts
slisse@planetinternet.be
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
John G Duffy
October 4th, 2001, 04:27 PM
My two cents worth
private Sub Command1_Click()
Dim x
for x = 1 to 5
Debug.print string(x, "*")
next x
End Sub
John G
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.