ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto button numbering (https://www.excelbanter.com/excel-programming/330642-auto-button-numbering.html)

J Streger

Auto button numbering
 
I have a sheet where the user enters a value for a variable and a number of
buttons based off that variable amount are added to the sheet. Then if they
change the number the sheet deletes the existing buttons and adds new ones to
match the number.

I notice that the automatic numbering is always increasing, so I'm up to
Button 889 now. I want to know if this will cause a problem, where I hit a
max button number or anything else. I know after creating numerous sheets in
excel the number resets when you close excel and open it again (Book1, book30
etc). I don't want to hit button 5000 and find out that memory is being used
for each of the previous buttons or that this is the max button count and the
sheet becomes useless. Thanks.


--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003


Gary Brown

Auto button numbering
 
Suggestion. As a part of your macro to delete the buttons, rename them at
the same time.
ie:
ActiveSheet.Buttons.Add(375.75, 136.5, 72, 72).Select
Selection.Name = "temp"
HTH,
--
Gary Brown

Please rate this posting if it is helpful to you.


"J Streger" wrote:

I have a sheet where the user enters a value for a variable and a number of
buttons based off that variable amount are added to the sheet. Then if they
change the number the sheet deletes the existing buttons and adds new ones to
match the number.

I notice that the automatic numbering is always increasing, so I'm up to
Button 889 now. I want to know if this will cause a problem, where I hit a
max button number or anything else. I know after creating numerous sheets in
excel the number resets when you close excel and open it again (Book1, book30
etc). I don't want to hit button 5000 and find out that memory is being used
for each of the previous buttons or that this is the max button count and the
sheet becomes useless. Thanks.


--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003



All times are GMT +1. The time now is 04:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com