G
Guest
I am writing a small program that needs to be able to open Excel
workbooks which are password protected. Does anyone know how to do this,
without any interaction from the user? I am sure it is something simple that
I am missing.
Here is the relevant section of my code:
ExcelApp = CType(CreateObject("Excel.Application"),
Excel.Application)
ExcelBook = ExcelApp.Workbooks.Open(File)
ExcelBook.Password = "aaaaaa"
ExcelSheet = ExcelBook.Worksheets("Sheet Sorted by Section Number")
ExcelApp.Visible = True
workbooks which are password protected. Does anyone know how to do this,
without any interaction from the user? I am sure it is something simple that
I am missing.
Here is the relevant section of my code:
ExcelApp = CType(CreateObject("Excel.Application"),
Excel.Application)
ExcelBook = ExcelApp.Workbooks.Open(File)
ExcelBook.Password = "aaaaaa"
ExcelSheet = ExcelBook.Worksheets("Sheet Sorted by Section Number")
ExcelApp.Visible = True