Creating a Userform using code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top