PDA

View Full Version : Problem openning Excel with 'Workbooks.Open '



arrun
12-10-2012, 12:41 AM
Dear all, I was trying to open Excel file using Workbooks.Open Method. However this failed upon following warning:

"Excel has detected a problem with this file. Openning it may be dangerous. You should not open this file unless you trust it"

How could I open such file and working on it (using VBA code) ignoring that message?


Thanks for your help

Teeroy
12-10-2012, 01:44 AM
It is part of your security setting for excel. I don't think there is a way to disable it with VBA and I'd be annoyed if there was (it is there to protect the PC from malicious code after all). Make the file a Trusted file and you won't get the warning (depending on your security settings, I think that's right for medium).