Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Controlling a MSHFlexGrid using a DLL

Posted on 2001-09-14
3
Medium Priority
?
345 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 300 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

Technology Partners: 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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

715 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