View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Guenter Guenter is offline
external usenet poster
 
Posts: 5
Default Inexplicable crash in VBA

Hi Harald,

Thx for the input, but this doesn't seem to be the pb here. I get the error
even if I try a 3-line program in an empty workbook (completely isolated from
my application) and hard-code the path and file name as in
OPEN "c:\Temp\Test.txt" FOR OUTPUT AS #1

This is really, really weird


"Harald Staff" wrote:

Hi Guenter

Every time I've encountered "quiet termination" of a code there has been a
Chr(0) somewhere inside a string value.

Best wishes Harald

"Guenter" skrev i melding
...
We ship a small Excel VBA application with our Time Reporting Terminal.

About
150 have been installed without a hitch - as far as I know under all past

and
present versions of Excel. In ONE particular case (which unfortunately
happens to be the french government) the instruction :

OPEN Text_File_Name FOR OUTPUT AS #n

causes the code to terminate WITHOUT ANY SORT OF ERROR MESSAGE (behaves

just
like an END statement). This happens in normal RUN mode as well as in
Step-by-Step Debug mode. Obviously since none of the code following the
statement is ever executed the application does not work.

The same error occurs with "APPEND". However, "OPEN FOR INPUT" works
correctly.

The environment is Excel 2000 under XP. The directory referenced exists

and
is accessible (I can create a text file in the directory with WordPad).

The
error occurs whether the file already exists or not. The Anti-Virus

program
on the PC concerned (Kaspersky) was turned off - no difference. The same
error occurs on another PC at the same site with identical configuration.

I'm getting desperate - has anybody out there encountered a similar
situation? I would be very grateful for any sort of help on this!

--
Guenter Kloepper