Rhonda, Sorry, no success with that code for the two documents mentioned in my post (I've kept a version copy of the client document which still displays the toolbars when opened). I made a working copy of the client document and created a new test.doc, added the sub-routine to my Normal.dot macros, opened each document in turn, ran the code (the toolbars didn't disappear), edited the document so it could be saved, then saved and re-opened it. The toolbars were still there. I tried it again, with just the 'test' document, this time I 'manually' closed the toolbars after running the code and before closing the document. Same result. So then, third time lucky, I closed the toolbars before running the code ... but no difference, they were still there when I re-opened the document. I then went to an old client template that automates a suite of letters through a VBA data entry interface – what goes into the data entry form populates the letter but also decides which of about 46 different flavours of letter is produced (internal / external applicant; full time / part time / casual; applicable award; etc.). I turned on the two toolbars, edited the document so it could be saved, saved it and then re-opened it and ran the code. This time, the toolbars disappeared and stayed that way. However, the same thing happens if I manually close the toolbars and then save the document, but that's only because the toolbars were displaying because I selected them, as opposed to a VBA component having an "open designer associated with it". So, the code probably does work correctly in cases where the toolbars are displaying for the reason stated (elements linked to the designer being open) but I guess falls over in other situations. The difference would be that where there are design elements that have an open designer associated with them, the code is most likely necessary to the correct working of the document and, therefore, deleting the VBA module would NOT be an option ... ... I then played around with the code a bit, creating a new user form in my test document and running the code while I had both the document and the VBA Editor open side-by-side. What the code does is, if a user form and any associated dialogs (e.g. Toolbox) are displaying in the VBA Editor code window, it changes the view so they are no longer visible. That's all it appears to do. I had the Toolbox controls open at the time and when I double-clicked on the Form module name to display the (blank) form again, the Toolbox controls were still open. The code doesn't appear to do anything at all in any of the other views (macro code, user form code). If that's all that the code does, then it would be simpler just to jump into the Editor and change the view so that the user form isn't displaying. Neil. I then went to an old template I have that automates a suite of letters through a VBA data entry interface, i.e. which includes Forms, and which (I remembered) has the toolbars displaying On 15/08/2011 6:38 PM, Rhonda Bracey wrote: ************************************************** To view the austechwriter archives, go to www.freelists.org/archives/austechwriter To unsubscribe, send a message to austechwriter-request@xxxxxxxxxxxxx with "unsubscribe" in the Subject field (without quotes). To manage your subscription (e.g., set and unset DIGEST and VACATION modes) go to www.freelists.org/list/austechwriter To contact the list administrator, send a message to austechwriter-admins@xxxxxxxxxxxxx ************************************************** |