Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to Open an Excel file with protection password and save it with a new
password again after changing the Excel. Now I know only: Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim xlsheet As Excel.Worksheet Set xlApp = CreateObject("Excel.Application") xlApp.Visible = True Set xlBook = xlApp.Workbooks.Open("D:\aa.xls", , , , 123) x1Book.Unprotect ("123") Set xlsheet = xlBook.Worksheets(1) xlsheet.Cells(1, 1) = abc xlBook.Close (True) xlApp.Quit But x1Book.Unprotect ("123") is error. And I don't know how to cancel the protect of Excel with VB ;and I don't know how to save it with a new password again after changing the Excel. Any help would be most appreciated. Torch Nee |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Password Protect so can't save and change | Excel Discussion (Misc queries) | |||
trying to save a document, I get inaccessible or password protect | Excel Discussion (Misc queries) | |||
Cancel 'Password' prompt during VBA | Excel Programming | |||
Password redundant through use of cancel | Excel Discussion (Misc queries) | |||
Cancel Macro is user selects 'cancel' at save menu | Excel Programming |