Solved

Controlling a MSHFlexGrid using a DLL

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…
Suggested Courses
Course of the Month6 days, 8 hours left to enroll

636 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