Copying Dialog Sheets to New Workbook
Copying Dialog Sheets to New Workbook
(OP)
Sometimes our complex workbooks become corrupt and the size increases enormously. The only solution seems to be to select all sheets and copy to a new workbook, same with macros.
This is painless except for dialog type sheets where the identification number of all objects changes, for example, Edit Box 30 becomes Edit Box 20. Any VB code referring to these no longer works. It is tedious to change all numbers and, if an object has visible property set to false, it's almost impossible.
Anyone have any idea how to work around this?
Thanks.
This is painless except for dialog type sheets where the identification number of all objects changes, for example, Edit Box 30 becomes Edit Box 20. Any VB code referring to these no longer works. It is tedious to change all numbers and, if an object has visible property set to false, it's almost impossible.
Anyone have any idea how to work around this?
Thanks.





RE: Copying Dialog Sheets to New Workbook
All you have to do is name the Edit Box. e.g. EB1.
When you copy the sheet the name remains the same EB1.
You name the Edit Box by typing over 'Edit Box 30' in the name box.
Hope this helps.
maybe only a drafter
but the best user here!
RE: Copying Dialog Sheets to New Workbook
This is the sort of tip that it would be much better to know before starting all the dialogs and coding the macros!