Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add New TextBox in Excel

Status
Not open for further replies.

chuair

Programmer
Apr 9, 2001
20
SG
Hi,

Just started playing around with Excel/VBA. My program of Excell spreadsheets will start with one textbox and a few checkboxes and one button.

When the user click on the button, a new textbox and checkboxes will be created and the button will be moved down. I can move the button down but how do I create a new textbox?

Thanks.




SleepingSnake
 
if you are using a form or something, just a suggestion but it may be easier to always have the textbox there and just enabling it or making it visible after the checkbox or toggle button was pressed
use button_click event
if button.value = true
textbox.enabled
or
textbox.visible = true
end if
*you 'll want to clear and set values for this depending on what you are doing but this may be more practical for your app?
 
Hi,

Because we wouldn't know how many entries are required that are needed from the users, sometimes just one and sometimes more than 5, my initial plan was to do what was to automatically add the text box and check boxes as the user click a Add button.

But come to think of it, your suggestion is great! Might just do that. But, does that mean that there is no way for us to write code to automatically add the text box and check boxes?

Thanks.




SleepingSnake
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top