Update Links that are password protected.

J

james

Hi,
I have the following button. It opens a spreadsheet that is password
protected. This spreadsheet has links to another password protected
spreadsheet. The button enters the password and sets update links to yes but
it then asks for a password to update the links I would like it to input the
password automatically. Can Anyone help please?

Thanks

Private Sub Command1_Click()
On Error GoTo Err_Command1_Click

Dim ExcelApp As Object 'Excel.Application
Dim ExcelWkb As Object 'Excel.Workbook

Set ExcelApp = CreateObject("Excel.Application")

Set ExcelWkb = ExcelApp.Workbooks

ExcelWkb.Open "C:\Test.xls", , , , "ABCDE", UpdateLinks:=1

ExcelWkb.Close

ExcelApp.Quit

Set ExcelWkb = Nothing
Set ExcelApp = Nothing

Exit_Command1_Click:
Exit Sub
Err_Command1_Click:
MsgBox Err.Description
Resume Exit_Command1_Click

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top