Excel VBA to loop thru Textboxes and check division

wardides

New Member
Joined
Jan 16, 2014
Messages
1
I have a large number of textboxes and labels on a form

So for example I have Label1 with caption 500 and beside it a text box (T5001) to enter an amount

What I need to do is find a way to loop thru all the textboxes and see if I can divide by the caption or the string in the text box name

So in this case I would have Textbox (T5001) and the number would have to be divisble by 500

Textbox (T2001) would have to be divisible by 200 etc

Is this possible as cant get my head around it
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,196,478
Messages
6,015,444
Members
441,895
Latest member
Zululander

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top