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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Userform Commandbutton Limit?

Status
Not open for further replies.
Dec 5, 2001
82
0
0
GB
Hello All,

Does anyone know if there is a limited to the number of commandbuttons you can add to a Excel Userform? I ask this because in Excel 2000 using the the toolbox I've added 6 commandbuttons, If I add a 7th and then view code for the 7th, while it opens the module it doesn't insert your "Private Sub CommandButton7_Click()" and "End Sub" text and if you look at the dropdown box on the top left which lists your objects it doesn't exist. However if I create another userform I can add more command buttons to that.

So in summary is there a from commandbutton per userform.

Thanks
[afro]
PS I should also add that I've got quite a few other textboxes, labels etc on the userform in question.
 
I have had lots more buttons on forms than that. How many other controls do you have on the form ? Make sure no controls overlap.

I would suspect some form of file corruption - which includes anything which might be in the workbook. When developing things poor old Excel cannot cope at times, and gives up trying to correct all our mistakes or give error messages.

Often we need to "bite the bullet" and start over. Especially when we think our application is finished. Recovery does not take as long as you might expect because we do not need to experiment any more.

Hope you are backing up regularly.




Regards
BrianB
Use CupOfCoffee to speed up all windows applications.
It is easy until you know how.
================================
 
Thanks for the response. If I do a simple loop to count the number of controls it says 132. Until I figure out how to get it on the main userform I've got secondary userform that I'm going to put the button on and tell the users that this is better application design!

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top