Jean-Marie
2015-11-16T11:23:16Z
Hello,
Can you help me?
I want to used Igrid ActiveX in VBA script of Rockwell FactoryTalkView SE script.
My code Is

Private Sub Display_AnimationStart()
MaGrille.AddCol sHeader:="Country", sKey:="country"
End Sub

and the return error is
Run-time error '91':
Object variable or With block variable not set

The VBA reference is
10Tec Igrid Control 5.0

thanks for your help
Igor/10Tec
2015-11-17T07:21:09Z
Another developer already tried to use iGrid in FactoryTalk View Supervisory Edition v7.0. From time to time they got a crash in RSIVBA, which is the Rockwell Software interface to the Microsoft VBA environment - a message like "RSIVBA has stopped working". Trying to find the source of this issues, they found that the iGrid references become scrambled at some point. The iGrid properties could be viewed in the VBA Immediate window, but executing the line of code related to iGrid displayed the error "object variable not set" or something like that.

Obviously, the problem is in the Rockwell software as iGrid is being used in many other VBA-based development environments without these problems. The developer contacted Rockwell Software, but they are not VBA developers and have offered little if any help. Their position is that anyone doing VBA development is generally on their own to resolve any issues...
pthurmond
2015-12-01T20:05:39Z
I am the developer that Igor referred to in the previous post. I have done extensive development with iGrid in FTView SE V7.0.

In response to your question, It appears to me you have created an instance of an iGrid on an HMI display, and the object name is MaGrille. If this is correct, then did you also set the ExposeToVBA property of the iGrid control to VBA Control? Right-click on the iGrid and choose Property Panel to access this property. If my assumptions are not correct, then I don't understand how you are using the iGrid control, and I would need more information.

Here are some of my findings related to using iGrid with FTVSE:
- The iGrid cannot be used directly on an FTVSE display to successfully view/interact with data. The iGrid populates, but for some reason FTVSE does not refresh the grid image, so that the contents cannot be viewed and/or manipulated.
- To use iGrid in FTVSE, I have had to include a VBA Userform with an iGrid instance, then launch the Userform from FTVSE VBA.
- The issue that Igor referred to is something I continue to wrestle with Rockwell to address. Using iGrid on a display or on a VBA Userform as a component of a display only runs successfully on the one computer used to develop the application. Running the same display on a different computer causes the RSIVBA crash. We use FTVSE Distributed rather than FTVSE Station, so we have an HMI server and several clients. The FTVSE client application will only run successfully on the last computer used to do development, where the iGrid reference is removed and added back into the VBA project, or where the ExposeToVBA property of the iGrid on the display is toggled between Not Exposed and VBA Control. For some reason these actions allow the internal RSIVBA references to resolve and the issue is fixed, but only on that computer. If it was previously working on computer A, and I fix it using computer B, now it works on computer B, but this action causes the crashes to occur on computer A - very frustrating. Rockwell acknowledges this issue, but has yet to discover the underlying cause, or to advance a resolution or work-around. At this point we are on hold with development using iGrid in FTVSE until there is a resolution. Maybe having another developer also trying to use iGrid could help push Rockwell to find a resolution more quickly.

FYI - as a final option to create a functional application, I had to move my VBA code and VBA Userforms with the iGrid controls out of FTVSE and into MS EXCEL. Then I interfaced the FTVSE VBA to my MS EXCEL project to link it all together as a single application. This worked great as an evaluation of iGrid. I am very satisfied with what I can do with iGrid. I am not satisfied with the MS EXCEL solution. It worked, but it is not the ideal solution for a process control environment. A patch to MS Office could break this functionality, which is too risky. I will need to wait for Rockwell to solve the RSIVBA issue, come up with a different VBA container, or develop in a different environment.