# Very basic function - maybe not possible?

**URL:** <https://forum.kirupa.com/t/very-basic-function-maybe-not-possible/147574>\
**Category:** Uncategorized\
**Created:** [May 11, 2005, 8:00pm UTC](https://forum.kirupa.com/t/very-basic-function-maybe-not-possible/147574 "2005-05-11T20:00:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![onetwo](https://avatars.discourse-cdn.com/v4/letter/o/3d9bf3/32.png) [@onetwo](https://forum.kirupa.com/u/onetwo)\
**Post date:** [May 11, 2005, 8:00pm UTC](https://forum.kirupa.com/t/very-basic-function-maybe-not-possible/147574/1 "2005-05-11T20:00:45Z")

</div>

Hi,

I have three variables my\_value1, my\_value2, my\_value3 and three dynamic textboxes.  
Now I would like to build a function that automatically gives me the following result: textbox1=“10” and textbox2=“20” and textbox3=“44”

I thought of a script like this:

my\_value1 =“10”;  
my\_value2=“20”;  
my\_value3=“44”;

for (i=1; i\<4; i++){  
textbox + i =my\_value + i;  
};

This does not work and then I also tried:  
textbox + i =“my\_value” + i;  
textbox + i ="my\_value\*;

(same combination with the textbox part was tried out).  
No result. But I do not know if it is possible to do something like this ?

I have a large amount of data and and am going to make a VBA/ Excel program genereate the script on basis of data retrieved from a database thus I need some kind of a function taking care of this for me…

Any suggestions are very much appreciated.

Best regards
