Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically create range of rows Avi Dubnikov Excel Discussion (Misc queries) 2 August 25th 07 02:00 AM
add controls on the fly/dynamically jinx_uk_98 Excel Discussion (Misc queries) 3 November 21st 05 10:46 PM
How can I create and display a chart dynamically on a UserForm wi. cc Charts and Charting in Excel 1 February 14th 05 02:44 PM
Program a combobox/dropdownlist to create textboxes dynamically ed Excel Programming 0 October 30th 03 09:02 PM
Dynamically create Total using VBA formula Kondayampalli Excel Programming 0 August 28th 03 03:06 PM


All times are GMT +1. The time now is 09:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"