text box referencing

lil_babie_z

New Member
Joined
Nov 8, 2005
Messages
3
ok-
so i have a bunch of text boxes - about 100 of them. named day00, day02, day03... day10 day12 day13... day20 day21 day22.... so on and soo soo.

it's all lined up and what i want to do is when it losses focus and the value is not 8 - it calls up a function that asks for more information.
(what the whole thing is, is an attendance sheet kinda - if they don't have a full 8 hr attendance it asks for more details why. )

anyway - is there any way i can reference to the text box value without saying "day01.text" or day00.value so i can just copy and paste to the every lost focus event with changing from day00.text to day01 day02... yadi yadi yaya. .... maybe say

if not text ="8" then....

instead of going

if not day01.value ="8"

i know - i said too much.. it's the coffee - i had 3 =)
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Where are these textboxes?

Is this Access or Excel?
 
Upvote 0
using arrays

you could use an array to reference your text boxes and then loop through it to run your check.
 
Upvote 0

Forum statistics

Threads
1,215,003
Messages
6,122,655
Members
449,091
Latest member
peppernaut

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