annoying pop up windows

  • Thread starter Thread starter epr
  • Start date Start date
E

epr

i am dealing with large number of files, basically, open the file, collect
some fields, then close it.

this process should go unattented, however, some of the files is causing
trouble for me:

1. the file has some links and always pop up a window asking me to
'continue' or 'update'.

this causes my process to stop till i click on ' continue'.

how can i programmingly do this?

i use C# and this happens right after i call workbook.open().

thanks.
 
One of the optional prameteres of the Open method is UpdateLinks:=True /
False. if you specify this parameter then the question will not be asked...
 
thank you Jim.

but i had everything set to false.

also, how do bypass ones that has password protection? there was a very
small amount of files and i don't have the real pwd, so i want to just click
'cancel' and move on.
 
You can try opening it with a dummy password and use that error to
tell your code to skip the file and continue:

Sub way()
On Error GoTo errHandler
Workbooks.Open fileName:="C:\somefile.xls", Password:="pw"
Exit Sub
errHandler:
If Left(Err.Description, 12) = "The password" Then
Resume Next
Else
MsgBox Err.Description
End If
End Sub

Cliff Edwards
 

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

Back
Top