Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Add controls to UserForm

Hi,

I'm trying to write a procedure where Excel will
automatically add a certain number of TextBoxes to a
UserForm based on the number of rows in a table. Can
this be done? Also, can a form be created on the fly
using code and how are commands assigned programmatically
to the controls on such a form?

Any advice and insight into this problem will be greatly
appreciated...
Vyyk
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default Add controls to UserForm


"Vyyk Drago" wrote in message
...
Hi,

I'm trying to write a procedure where Excel will
automatically add a certain number of TextBoxes to a
UserForm based on the number of rows in a table. Can
this be done?


Yes but it may not be the best approach

A grid control may work better or you may find it better
to have a form with pre-defined text boxes and on which
you make visible only as many as you require

Also, can a form be created on the fly
using code and how are commands assigned programmatically
to the controls on such a form?


Yes but again I dont recommend it , its far better to
use a grid where you need a table IMHO

Keith


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Add controls to UserForm

See John Walkenbach's site for an example:

http://j-walk.com/ss/excel/tips/tip76.htm
Creating a UserForm Programmatically


--
Regards,
Tom Ogilvy

"Vyyk Drago" wrote in message
...
Hi,

I'm trying to write a procedure where Excel will
automatically add a certain number of TextBoxes to a
UserForm based on the number of rows in a table. Can
this be done? Also, can a form be created on the fly
using code and how are commands assigned programmatically
to the controls on such a form?

Any advice and insight into this problem will be greatly
appreciated...
Vyyk



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Add controls to UserForm

Thanks! That really helped a lot... :)
Kind regards
Vyyk


-----Original Message-----
Hi,

I'm trying to write a procedure where Excel will
automatically add a certain number of TextBoxes to a
UserForm based on the number of rows in a table. Can
this be done? Also, can a form be created on the fly
using code and how are commands assigned

programmatically
to the controls on such a form?

Any advice and insight into this problem will be greatly
appreciated...
Vyyk
.

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
Controls Toolbox Gene Augustin Excel Discussion (Misc queries) 0 October 10th 09 03:40 PM
using gui controls daddy260 Excel Discussion (Misc queries) 4 May 25th 07 07:35 AM
ActiveX Controls vs Form Controls Alex Excel Discussion (Misc queries) 1 January 11th 06 08:46 AM
How can I find a handle number of controls on Userform? sjoo Excel Programming 1 August 4th 03 10:21 AM
What order does VBA look at userform controls? Brad Patterson Excel Programming 3 July 17th 03 03:46 AM


All times are GMT +1. The time now is 05:07 PM.

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

About Us

"It's about Microsoft Excel"