Solved

Controlling a MSHFlexGrid using a DLL

Posted on 2001-09-14
3
324 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

911 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now