Auto-Generate Textboxes with code in Access VBA
<p>I tried using Auto Subs, but I can't understand that well..</p>

<p>I have Multiple (In this case 59) Textboxes/Buttons in a Form, everything with a <strong>Click Event</strong>. But in VBA I don't want to make every single one with code because I want to make the Form easy to control and use it to someone who doesn't code, and having <strong>59 Click Subs</strong> would be quite ugly and if I wanted to add more I would need to create in the VBA Code another Sub.</p>

<p>The real question is: <strong>Is there some way to do Auto Code (Sub) for every Text/ Button with different variables?</strong></p>

<p><em>E.G.:</em></p>

<pre><code>Text1_Click + Code -&gt; Variable: 1
Text2_Click + Code -&gt; Variable: 2
Text3_Click + Code -&gt; Variable: 3   --&gt; Text(?)_Click + Code -&gt; Variable: ?
Text4_Click + Code -&gt; Variable: 4
Text5_Click + Code -&gt; Variable: 5
</code></pre>