ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to use text boxes as an array in an EXCEL user form (https://www.excelbanter.com/excel-programming/424652-how-use-text-boxes-array-excel-user-form.html)

MWJchmsn

how to use text boxes as an array in an EXCEL user form
 
How can a series of text boxes or labels be used as an array within a MS
EXCEL user form? (MS Office 2003/EXCEL)

Nigel[_2_]

how to use text boxes as an array in an EXCEL user form
 
Not sure what you want to do, but if you are trying to map contents of
UserForm controls into an array then depending on how you named your
controls this may be easy or not. The same applies if you want to move the
contents of the array to the controls.

Perhaps you could be more specific in explaining what you are trying to do?



--

Regards,
Nigel




"MWJchmsn" wrote in message
...
How can a series of text boxes or labels be used as an array within a MS
EXCEL user form? (MS Office 2003/EXCEL)



Rick Rothstein

how to use text boxes as an array in an EXCEL user form
 
Name your TextBoxes with the same beginning text and then affix sequential
numbers after them. For example, names something like this...

ArrayTBox1, ArrayTBox2, ..., ArrayTBox10, ArrayTBox11, etc

Here is simple code to showing you how to use the Controls collection to
address them...

For X = 1 To 12
Controls("ArrayTBox" & X).Value = "TBox Number: " & X
Next

Obviously, the TextBoxes will not be in a "true" array, but you will be able
to address them as if they were.

--
Rick (MVP - Excel)


"MWJchmsn" wrote in message
...
How can a series of text boxes or labels be used as an array within a MS
EXCEL user form? (MS Office 2003/EXCEL)




All times are GMT +1. The time now is 01:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com