View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kevin E. Kevin E. is offline
external usenet poster
 
Posts: 16
Default Adding Code to Command Button Added At Run Time

I have a poject with a form which has a Command Button, Text Box, and Label
control added to it at run time. It has taken me at least three hours (I'm
extremely new at programming) to figure out how to add the three controls to
my form at run time. Once I finally figured out how to do all that I
realized I didn't know how to add code to make my command button do
something. What I want to do is after my form is shown on the screen, the
label presents a question "How many text boxes do you want added to the
screen?". The user will enter the number (1 - 10) in the text box and then
hit ok. The code under that button should then remove the initial Label,
Text Box and Command Button controls, and add the specified number of text
boxes, and resize the screen according to the amount of text boxes added.