Hi, I do that, but not using a msdos command. I have an excel workbook, containg the password (encrypted) that will call the workbook/ workbooks that I want to run through the windows schdule event.Ex. Th workbook has one or more updates of other excel workbooks to run - an update function is called from the worbook_open event of this workbook. This function open and run update macros of the other workbooks, that may be protected or not. Ex. Private Sub Workbook_Open() Call mdlRun.Update ThisWorkbook.Saved = True Application.Quit End Sub Opening another workbook from within Excel vba is no big thing, with or without passing a password to open the workbook.
Ex. strFileNm = "MyWorkbookName" strPath = "C:\MyWorkbookPath" strUpdate = "MyMacroName" Workbooks.Open Filename:=strPath & strFileNm, UpdateLinks:=False, ReadOnly:=False, Password:="MyPassword" Application.Run "'" & strPath & strFileNm & "'" & "!" & strUpdate Workbooks(strFileNm).Save Workbooks(strFileNm).Close This way I can easily add or remove files to be updated without the need to add schedules as I in my update macro in the schedule worksbook, loops cells containing the information for path, filename, and macro. One alternative way. BR/ Lotta On 22 Sep, 11:16, EvilButterfly <rje...@gmail.com> wrote: > Dear all, > I have a question about excel file protection. I would like to know if > it is possible to open an excel file with a password for protection > for opening via a msdos command. > > Something like: > c:\"MyFile.xls" (password for opening) > > The goal is to open it automatically with the windows tasks schedule > via a dos command. > If you have another solution that would be cool too. > > Thanks in advance. -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> HELP US GROW !! We reach over 7000 subscribers worldwide and receive many nice notes about the learning and support from the group.Let friends and co-workers know they can subscribe to group at http://groups.google.com/group/excel-macros/subscribe