Excel crash when doing OpenXML, apparently involving DisplayAlerts

J

jlbradley1844

Hello,

I have workbook that crashes when I do an OpenXML on an XML file.
(This must be run under Excel 2003 Professional for that to work). I
spotted this on a big ugly excel file, but fortunately, I can make it
crash on a much simpler workbook, consisting of just the following:

1. the following 5-line macro:

Sub RunTest()
Application.DisplayAlerts = False 'turn off warnings only when
reading XML
Workbooks.OpenXML Filename:="test.xml",
LoadOption:=xlXmlLoadImportToList
Application.DisplayAlerts = True
End Sub

and

2. A blank sheet with a button to call RunTest().


Now, the reason I am saying DisplayAlerts have something to do with
the crash is because when I comment out the DisplayAlerts lines the
macro runs just fine. I do get an alert box having to do with an
import warning, which is why I put the DisplayAlerts there in the
first place.

So my question out there is: does anyone know if there is a known
issue with setting DisplayAlerts issue to false????

I don't expect anyone out there to fix this, but I'd like to know if
anyone out there knows about the issue. I can't find anything on any
of the microsoft web pages or forums. But I don't want to burn an
incident on this, just in case there's a tech note that I missed that
explains the situation.

Thanks,

Joe

(p.s. if you're curious about test.xml, it's about 200k and I will
spare you the contents. It's a straight dump from the output of an SQL
query to MS SQL that uses the FOR XML clause).
 

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