ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Creating a Userform using code (https://www.excelbanter.com/excel-programming/324660-creating-userform-using-code.html)

trini

Creating a Userform using code
 
Hi everyone,
Can anyone tell me if it is possible and how I could create a userform using
code. My idea is that I use an inputbox to find out how many textboxes the
user wants in their userform and then the userform is created. Any help would
be appreciated.
Thanks
Trini

Tom Ogilvy

Creating a Userform using code
 
It would be easier to create the userform manually and arrange the maximum
number of textboxes you would support. then, in reaction to the number
entered by the user in the input box, make the number you want to use
visible = True and the remainder visible = False in the Initialize Event of
the userform.

For your suggested approach, see John Walkenbach's sample code:

http://j-walk.com/ss/excel/tips/tip76.htm
Create a Userform Programmatically

--
Regards,
Tom Ogilvy

"trini" wrote in message
...
Hi everyone,
Can anyone tell me if it is possible and how I could create a userform

using
code. My idea is that I use an inputbox to find out how many textboxes the
user wants in their userform and then the userform is created. Any help

would
be appreciated.
Thanks
Trini





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

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