Solved

Controlling a MSHFlexGrid using a DLL

Posted on 2001-09-14
3
333 Views
Last Modified: 2006-11-17
I am writing an app that uses ActiveX documents. One of these documents contains a MSHFlexGrid.

I have an XML file which contains parameters to control certain properties of the grid e.g column widths.

Via a dll, containing class modules I need to create a reference to the grid so that from within the ActiveX document I just call a function in the dll which will control properties of this grid.

I have heard this can be done through Property Get, Set statements but have not used these before.

Could anyone point me in the right direction...
0
Comment
Question by:CarlJWhite
  • 2
3 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 100 total points
ID: 6482104
In the DLL, add a declaration

Private MyGrid As Object

You can then have a public sub:

Public Property Let GridReference(TheGrid As Object)
  Set MyGrid = TheGrid
End Property

Calling this Property with

MyDll.GridReference = MSHFlexgrid1

Will then set an internal reference to the grid withing the DLL. Any reference to MyGrid then will actually have an effect on the external grid passed in this way.
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 6482116
If you have an MSHFlexgrid component in the DLL project somewhere, you can declare and pass it as MSHFlexgrid rather than as object.
0
 

Author Comment

by:CarlJWhite
ID: 6482277
Worked a treat.

Cheers....
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question