ActiveX Question

Started by John Messingham, November 02, 2004, 02:33:35 PM

Previous topic - Next topic

John Messingham

Hi,

I have an activex grid control that I use with VB.

Using the help I got from Jose with regard to my email component, I have started working on this control. However, when I exit the application, I get the following message.

The instruction at "0x11124e50" referenced memory at "0x11124e50. The memory could not be read.

I was just wondering if this meant anything to Jose or anyone else.

Jose Roca

> The instruction at "0x11124e50" referenced memory at "0x11124e50. The memory could not be read.

This is a GPF (General Protection Fault), but we need to know more, like the name of the grid and the code that you're using.

John Messingham

Hi Jose,

The grid is the activex version from http://www.grid2000.com

Here is the code. I decided to see if I could get it working with PB.

Dim cRow As Variant
Dim cCol As Variant
Dim gCell As Variant
Dim cText As Variant

cCol = 1
cRow = 1
cText = "Test"

Dim oCell As Dispatch
                   
Object Call DISPATCH_FORM1_OCXCONTROL1.cell(cRow,cCol) To gCell
Set oCell = gCell

Object Let oCEll.Text() = cText

Object Call DISPATCH_FORM1_OCXCONTROL1.refresh

Set oCell = nothing

Jose Roca

The grid is succesfully initialized, i.e. it appears in the dialog?

I don't see in your code any instruction setting the number of rows and columns of the grid.

Check if the value returned in gCell is valid, i.e. <> 0.

If all of the above is correct, maybe the GPF is not related with the grid.

Start a new project and include an instance of the grid, without an other controls, and build it. If it doesn't GPF then add the code that you have posted and rebuild it.