![]() |
Create controls dynamically
John Walkenbach has some sample code related to what you want to do although
not an exact match: http://j-walk.com/ss/excel/tips/tip76.htm Creating a UserForm Programmatically http://j-walk.com/ss/excel/tips/tip44.htm dle Multiple UserForm Buttons With One Subroutine also see Chip Pearson's page on programming the VBE: http://www.cpearson.com/excel/vbe.htm A general comment would be that it would be easier to create your userform in the VBE, including the appropriate event code and make the controls you don't need invisible. You can adjust the height of the Userform, so they are not even on the visible part of the userform. -- Regards, Tom Ogilvy "ed" wrote in message ... Hi all, I am working on an Excel VBA Project that requires that I dynamically create controls using vba. Scenario: I will have a text box and a commandbutton that submits the request. When I enter a number from 1-10 in a textbox. I create a loop that counts from 1 to the number entered in the textbox. Then create the corresponding amount of controls dynamically. Your assistance will be greatly appreciated. Ed |
All times are GMT +1. The time now is 07:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com