
Function question from a beginner...please help!
Hi. My name's Josh. I have a simple question involving functions that I
was hoping someone could help me answer.
I have some code that goes like this:
---START OF CODE---
For t = 1 to 8 step 2
text2(t).text = Form1.text(t).text
('and some other lines just like the one above)
Next t
---END OF CODE---
I was thinking...rather than make this a for/next loop, could I put it
into a function, and just pass the function the number I wanted t to equal?
(This would help me later on in the program, where I have to do this same
code block again. Currently I am using another for/next loop to do it
again, which seems to be a waste of code).
My custom-made function went like this:
---START FUNCTION---
Function Josh (t)
text2(t).text = Form1.text(t).text
End Function
---END FUNCTION
...but it didn't work. Could someone help me out with the proper way to
declare and format a function? I have looked at the MSDN disk, tried to do
it like it was presented there, but am still baffled.
Thanks for your help!!
Josh DeWinter
Spokane, WA