Discretely open workbook with password?
Hello,
I'm using Excel/Access 2003. I have an Access form that will transfer Excel spreadsheets into Access using TransferSpreadsheet. The Excel spreadsheet I need to import is password protected, and I have the password. Does anyone know what the code would look like that would open the workbook, using the password I already have, so that I can successfully transfer the spreadsheet into Access without any sort of manual prompt for a password? I have tried simply transfering a protected workbook and it's not taking. So I'm assuming I must first open the workbook before I can transfer. Suggestions are welcome! Thanks, -Scott |
Discretely open workbook with password?
While password to modify is not set, this works for me:
Sub Openpwddbook() Workbooks.Open Filename:="e:\book5.xls", Password:="123" End Sub -- Regards, Halim "scottydel" wrote: Hello, I'm using Excel/Access 2003. I have an Access form that will transfer Excel spreadsheets into Access using TransferSpreadsheet. The Excel spreadsheet I need to import is password protected, and I have the password. Does anyone know what the code would look like that would open the workbook, using the password I already have, so that I can successfully transfer the spreadsheet into Access without any sort of manual prompt for a password? I have tried simply transfering a protected workbook and it's not taking. So I'm assuming I must first open the workbook before I can transfer. Suggestions are welcome! Thanks, -Scott |
All times are GMT +1. The time now is 02:47 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com