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

Copying Dialog Sheets to New Workbook

Status
Not open for further replies.

toog

Structural
Joined
Mar 12, 2002
Messages
12
Location
NZ
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.
 
Quite simple I think.

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!
 
Thanks, onlyadrafter, that is helpful advice.

This is the sort of tip that it would be much better to know before starting all the dialogs and coding the macros!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top