1 Replies - 909 Views - Last Post: 21 July 2014 - 09:45 AM Rate Topic: -----

#1 jwjwjwjw  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 21-July 14

Handle warnings when opening excel file

Posted 21 July 2014 - 06:53 AM

Hi,
I'm working on a project, where a for-each function will open 1200 excel files, read some data from them,drop that in another excel file, and close them. Problem is that some files are pretty old and when i open them (both via code or directly from browser), i get 2 or 3 messages with only "OK" to press. The file then opens normally.

Messages are like:
"NAMED-RANGE" - exception from hresult 0x800a03ec
Invalid Index (exception from hresult 0x80...)
attempt to read write protected memory
Excel cannot complete this task with available resources ...

I would like to ignore or dissable these message in code.
Application.DisplayWarnings to False doesn't work

Cheerz,

JW

Is This A Good Question/Topic? 0
  • +

Replies To: Handle warnings when opening excel file

#2 andrewsw  Icon User is offline

  • It's just been revoked!
  • member icon

Reputation: 3746
  • View blog
  • Posts: 13,116
  • Joined: 12-December 12

Re: Handle warnings when opening excel file

Posted 21 July 2014 - 09:45 AM

How many of these files are there? If not too many you might either convert them, or work with converted copies, to Excel 2007+.

Or try "Open and Repair".
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1