![]() |
Opening/Closing workbooks without dialog boxes
Fellow users,
It has been a while, hope this finds you all in good health. Excel 2000 (VBA) I generated some code using the macro recorder. The code will open an Excel document, copy some info from it, paste the info onto a separate workbook, and close the opened document. The code does this for every Excel document in a directory that I specify, and that, one at a time. This leaves me with a workbook with information from all of the workbooks in a directory. Problem 1: One problem is that some of the Excel documents are password protected and prompt me with a dialog box that asks me if I want to open in Read Only mode, the answer is always yes. How do I open an Excel document so that I don't have to click the Read Only button on the dialog box (I'm looking for automation here)? Problem 2: After a workbook is closed, I am prompted with another dialog box that there is still data in the clipboard and do I want to keep it there, the answer is always no. How do I keep the application from asking me this using code? Thanks for any help you can offer, Steve R :) |
Opening/Closing workbooks without dialog boxes
application.displayalerts=false
application.cutcopymode=false Tim -- Tim Williams Palo Alto, CA "Steve :)" wrote in message ... Fellow users, It has been a while, hope this finds you all in good health. Excel 2000 (VBA) I generated some code using the macro recorder. The code will open an Excel document, copy some info from it, paste the info onto a separate workbook, and close the opened document. The code does this for every Excel document in a directory that I specify, and that, one at a time. This leaves me with a workbook with information from all of the workbooks in a directory. Problem 1: One problem is that some of the Excel documents are password protected and prompt me with a dialog box that asks me if I want to open in Read Only mode, the answer is always yes. How do I open an Excel document so that I don't have to click the Read Only button on the dialog box (I'm looking for automation here)? Problem 2: After a workbook is closed, I am prompted with another dialog box that there is still data in the clipboard and do I want to keep it there, the answer is always no. How do I keep the application from asking me this using code? Thanks for any help you can offer, Steve R :) |
Opening/Closing workbooks without dialog boxes
Hey Tim,
Thank you, I'll give it a try. Steve R. On Tue, 20 Sep 2005 12:59:32 -0700, "Tim Williams" <timjwilliams at gmail dot com wrote: application.displayalerts=false application.cutcopymode=false Tim |
All times are GMT +1. The time now is 10:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com