View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Renato Renato is offline
external usenet poster
 
Posts: 11
Default Excel crashes during a module execution

doesn't work...


"AA2e72E" wrote:

You might try replacing
.Fields.Append "QtÃ*", adInteger

by .Fields.Append "[QtÃ*]", adInteger


"Renato" wrote:

Hi all,
I'm using inside Excel2000 a VBA module
where at a certain point I use a temporary
ADO recordset : when I recall the open method
(see the code below) Excel crashes with the following error :

The instruction at "0x1f4474b6" refers to the memory at
"0x00000530".The memory could not be "written".

This happened on a Windows2000prof sp4 machine
(MDAC 2.8).
I tried the same code on a Windows98-2ED machine
and everything works properly!
Why?

Thank in advance for any help.

Renato Debiasi

...
dim rsteventi as New ADODB.Recordset
...

Set rsteventi = New ADODB.Recordset

With rsteventi
.Fields.Append "Ev", adBSTR, 10
.Fields.Append "St", adBSTR, 1
.Fields.Append "T", adBSTR, 1
.Fields.Append "Num", adInteger
.Fields.Append "CliFor", adBSTR, 20
.Fields.Append "RifCli", adBSTR, 10
.Fields.Append "Val", adBSTR, 3
.Fields.Append "ValTot", adInteger
.Fields.Append "QtÃ*", adInteger
.Fields.Append "Disp", adInteger
.CursorType = adOpenStatic
.LockType = adLockOptimistic
.Open
End With
....