4 Replies Latest reply on Oct 20, 2009 1:27 PM by mweiss

    Substitutes for MsFlexGrid in ProcessBook

    Clint.Ostby

      Hi all,

       

      We operate in a locked-down desktop environment. This makes it easy for us to deploy consistent solutions, but one drawback to this environment is that automated Windows patching can disable specific ActiveX control versions (such as MsFlexGrid) as a security measure. The process for getting an upgraded MsFlexGrid deployed to our users is rather cumbersome.

       

      Can anybody recommend a substitute to the MsFlexGrid control? The app that we are using this in is a Module Context driven ProcessBook display that uses the FlexGrid to display a list of assets and some associated values from the PI system. The number of assets can vary depending upon the current Module Context...anywhere from 1 to 30 sub-assets. The FlexGrid is an easy solution, but impractical in that we have to continually manage patching in order to keep the app up & running.

       

      Any thoughts on alternative solutions? MS Forms 2.0 Listbox works but is a bit clunky. Has anybody taken a different approach to this requirement?

       

      Thanks

       

      - Clint

        • Re: Substitutes for MsFlexGrid in ProcessBook
          cescamilla

          I think you would really benefit from looking at this webpage. I have not tried this yet, but it would be great if you could test that out and tell us if it works. I'll try it as soon as I can.

            • Re: Substitutes for MsFlexGrid in ProcessBook
              cescamilla

              I will also look for replacements, I remember having seen some replacements but all of them were in .net

               

              As someother vCampus team member commented, the solution may include to create a .net control wrapper to be used in VBA.

               

              I'll look for instructions on how to create that and a good replace control for the MsFlexGrid.

                • Re: Substitutes for MsFlexGrid in ProcessBook

                  As Cristobal pointed out, you have better chances of finding an equivalent to MsFlexGrid in .NET rather than in VB6/VBA. My suggestion would be that you write a .NET add-in to PI ProcessBook (most likely in a "docking window") to drop that control you eventually find (I'm sorry but I'm not aware of any equivalent myself at this point... ).

                   

                  To code your add-in (if you choose to go that route), simply take the add-in templates available on the vCampus Download Center (under the "Supporting Files" category) and start from one of them: the simple (no UI) add-in, the toolbar add-in, the docking window add-in or the IDataProvider3 (i.e. Data Set) add-in. Then post any question you may have in this same forum 

                   

                  Happy coding!

              • Re: Substitutes for MsFlexGrid in ProcessBook
                mweiss

                I'd be surprised that that the latest (unbanned) flexgrid would be banned any time soon, but you never know.

                 

                Nearly any ActiveX control should work fine on a VBA form. Back in "the day" (pre .NET) there was a huge selection 3rd party of ActiveX grid/spreadsheet controls. I'm sure they are still around. However, you'd still have to deploy the control to all machines that would need to open/edit that ProcessBook display. Check out http://www.componentsource.com. Filter any searches for Grid or Spreadsheets by Component > ActiveX / COM > ActiveX OCX. I've used FarPoint's Spread control, but it's not cheap.

                 

                The way Microsoft is "blacklisting" ActiveX control via Windows Update only effects controls loaded into Internet Explorer webpages and VBA Forms (like in Microsoft Office and ProcessBook). Banned controls (MSFlexGrid) will still work fine if loaded in other ways. One workaround would be to re-write your form outside VBA (maybe as a  VB6 ActiveX DLL or a VB.NET/C# Assembly). You could still use MSFlexGrid - or something else as your grid. In that same project create your own COM object with a single method that shows that dialog (you'll need to pass the ProcessBook Display and/or Application object as a parameter). Back in the PB Display's VBA code you remove the old form and replace it with calls to show you new form (you'll have to add it as a Reference). This is simlar to the ProcessBook add-in suggestion.