MS Office-Access/Excel/Word
Frequently Asked Questions (exontrol)
ACC.0:
In Microsoft Office 32-bit you can use any of the following versions:
  • /COM indicates the 32-bit edition of the ActiveX version

The application built using /COM version runs on any Windows 32 or 64-bit machine.

In Microsoft Office 64-bit you can use any of the following versions:

  • /COM/64 indicates the 64-bit edition of the ActiveX version

The application built using /COM/64 version runs on Windows 64-bit machine only. The application built using /COM/64 version cannot run on Windows 32-bit machine.

If you want to use your application on 32 and 64-bit machines, you can go for:

  • /COM/ANY indicates the 32 and 64-bit editions of the ActiveX versions

Should I use a 32-bit or 64-bit version of the control?

ACC.1:
IntelliSense is Microsoft's implementation of autocompletion, best known for its use in the Microsoft Visual Studio integrated development environment. In addition to completing the symbol names the programmer is typing, IntelliSense serves as documentation and disambiguation for variable names, functions and methods using reflection.

Let's say you need the IntelliSense for the eXGrid component. In your code add this:
Dim g As EXGRIDLib.grid
Set g = Grid1.Object

If you type g and then type . (dot) the properties and methods available for the g object will be displayed to a popup listbox.

ACC.2:
You need to install the COM/ActiveX version of the control. Based on your MS Office, you need to choose 32 or 64 bit version of the component as explained in What configuration should I install so I can use in MS Access/Excel?

Once you have installed the product, you should file the MS Office samples here:

  • C:\Program Files\Exontrol\Ex...\Sample\Access2007, for 32-bit machines, or Office 64-bit on x64 machines.
  • C:\Program Files (x86)\Exontrol\Ex...\Sample\Access2007, for Office 32-bit on x64 machines.

When you open the accdb file you may be prompted for an MS Access security as shown bellow:

You have to choose Enable this content, else you may not be able to run any of installed samples.
ACC.3:
You need to install the COM/ActiveX version of the control. Choose the product's installer from from the ActiveX/COM column in the download page, or at Point 1 in the product's download page. The MSI installer installs the 32-bit ANSI version of the component.
  • 32-bit/64-bit, indicates 32-bit or 64-bit edition of the Microsoft Access. The 64-bit version works only on 64-bit Windows system.
ACC.4:
The most probably you installed the x64 version of the component on your Windows 64. The x64 version of the component is for x64 applications only. The MS Access/Excel is still a 32-bit application, and so it runs on WOW64 on Windows 64, so only 32-bit components are visible. 

In order to fix or run any of samples you need to download and install the /COM (32-bit) version of the component. The 64-bit version of the component is visible for 64-bit applications only, and so the component is actually not visible for 32-bit applications such as MS Access/Excel.  

ACC.5:
The Open event occurs when a form is opened, but before the first record is displayed. The Open event occurs before the Load event, which is triggered when a form is opened and its records are displayed. If you're trying to decide whether to use the Open or Load event for your event procedure, one significant difference is that the Open event can be canceled, but the Load event can't. Another significant difference is that the events of an ActiveX control are not triggered during the Open event, but they are fired during the Load event. You can do the following test using a simple Microsoft Calendar Control like:
  • create a form
  • insert a Calendar Control to the form
  • paste the following snippet of code in the form
Option Compare Database

Dim strEvent As String
Private Sub ActiveXCtl0_NewYear()
    MsgBox strEvent
End Sub

Private Sub Form_Load()
    strEvent = "NewYear event during Form_Load"
    ActiveXCtl0.Year = 1971
End Sub

Private Sub Form_Open(Cancel As Integer)
    strEvent = "NewYear event during Form_Open"
    ActiveXCtl0.Year = 1971
End Sub
  • save the form
  • run the form
The message "NewYear event during Form_Load" will be displayed when you are running the form, which means that the ActiveX events are not fired during the Open event. They are fired during the Form_Load event.
ACC.6:
The MS Access/Excel extended control implements the Visible property, and other properties such as Width, Height, Left, Top and so on. It's up to the container how the Visible property is implemented. In a MS Access/Excel container, calling the Visible property on False destroys or closes the ActiveX control. This is valid for any ActiveX control, not only of ours. For instance, the VB6 which is a similar container, the Visible property hides the control as it should

The solution to hide an ActiveX control in MS Access/Excel container, is one of the following:

  • Adds or subtract from the Left or  Top property a value such as 16000 so the visible part of the control is not displayed on the form, like in the setVisible method listed bellow.
  • Call control's Width or/and Height  property on 0, that makes the size of the control to be empty, so nothing is displayed. This has the disadvantage that it resizes the control.

The setVisible method adds 16000 to Left property if the control gets hidden, or subtract 16000, if the control gets visible:

Private Sub setVisible(ByVal o As Object, ByVal v As Boolean)
    With o
        .Left = IIf(v, -16000, 16000) + .Left
        .Enabled = v
    End With
End Sub
So any time, you need to call the Visible property, just call the setVisible( object, true/false ) method.
ACC.7:
Due old implementation of the MS Access/Excel's Tab control, the control hosted by a page is destroyed instead hiding, when a new page is selected or unselected. The solution is removing the control from the Tab's Page, so the control's container will be the Form itself, and calling the Width or Left property of the control to change the width or the position of the control when a page is selected or unselected. Select the control on design mode, right click, and select Cut from its context menu. Click the Form, and then Paste. This way the control is hosted by the form instead Tab's page. Click the Pages in design mode, and if the control is still visible, that means that the control is properly hosted by the form as it should for the solution. If the control is hidden, when selecting a new page, it means that the control is still hosted by the page. Also, you can use the Tab order to change the Z-Order of the controls in the form, so the control will be shown over the Tab. 

The following Access sample hides the control when a new page is selected:

Private Sub TabCtl1_Change()
    With Tree1
    If (.Width > 0) Then .Tag = .Width
        .Width = IIf(TabCtl1.Value = 0, .Tag, 0)
    End With
End Sub
The sample saves the control's Width to the Tag property and change the Left property to 0 or restore back the value when a new page is selected. This code does not require re-initialization of the control. Instead, if using the Visible property of the control is not a solution, as it destroys the control on Access, so a new initialization is required.
ACC.8:
If you pasted some VB code in your Access code, please check the syntax for each event in your form. In MS Access/Excel the syntax for the events is a bit different than VB syntax. For instance, in VB the syntax for OleDragDrop event is
Private Sub Grid1_OLEDragDrop(ByVal Data As EXGRIDLibCtl.IExDataObject, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
and in Access the right syntax  is
Private Sub Grid1_OLEDragDrop(ByVal Data As Object, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Long, ByVal Y As Long)
As you can notice the type for Data parameter differs.

In order to find out the right syntax for the control's event in your Access environment, please do the following:

  • create a new form
  • insert the component to the form
  • select the 'Build Event...' from the control's context menu in design mode
  • select the component from the list of components ( upper left combobox )
  • select the event from the list of events ( upper right combobox )
  • Access adds the an empty handler for the selected event
ACC.9:
Usually you need the Screen object to convert the coordinates from twips to pixels as they are required for some properties such as ItemFromPoint, ColumnFromPoint, WordFromPoint, AnchorFromPoint Chart.DateFromPoint, Chart.LevelFromPoint, Chart.NoteFromPoint, Chart.LinkFromPoint, Chart.TimeZoneFromPoint, Chart.HistogramValueFromPoint and so on. 

All of these properties support -1 for X and Y parameters, so instead calling the 

  • ItemFromPoint(X / Screen.TwipsPerPixelX, Y / Screen.TwipsPerPixelY,...) 

you should use the 

  • ItemFromPoint(-1,-1, ... ) 

as in the following sample:

The following Access sample displays the caption from the point being double clicked:

Private Sub Grid1_DblClick(ByVal Shift As Integer, ByVal X As Long, ByVal Y As Long)
    With Grid1
        Dim c As Long, hit As Long, h As Long
        h = .ItemFromPoint(-1, -1, c, hit)
        If (h <> 0) Then
            With .Items
                MsgBox .CellCaption(h, c)
            End With
        End If
    End With 

However, if you really need a converter from twips to pixels, please use the following code. 

The article ACC2000, How to convert Twips to Pixels, explains what you have to do. Anyway, here's the Twips2Pixels function that converts X and Y twips coordinates to pixels coordinates.

Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hDC As Long) As Long
Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hDC As Long, ByVal nIndex As Long) As Long
Private Const LOGPIXELSX = 88
Private Const LOGPIXELSY = 90
' Converts twips corrdinates to pixels coordinates
Private Sub Twips2Pixels(X As Long, Y As Long)
    Dim hDC As Long
    hDC = GetDC(0)
    X = X / 1440 * GetDeviceCaps(hDC, LOGPIXELSX)
    Y = Y / 1440 * GetDeviceCaps(hDC, LOGPIXELSY)
    ReleaseDC 0, hDC
End Sub
ACC.10:
Usually it is happen when you are trying something like:
Dim o As EXGRIDLib.Grid
Set o = Grid1

instead

Dim o As EXGRIDLib.Grid
Set o = Grid1.Object

The Access, as VB or VFP and other environments, implements an extended control that hosts the original component. For instance, the Visible, Top, Left, ... or Object property is implemented by this extended control, NOT by component. The component is implemented by us, the extended control is implemented by the container. The Object property gets back the original component, without its extended control. In the first sample the message occurs, because the type of the Grid1 object is not EXGRIDLib.Lib, it is _Control, in most of the cases. You can find exactly the name of the type for sure using the Interfaces property o f the Exontrol's eXPropertiesList control, like follows:

MsgBox P1.Interfaces(Grid1)
where the P1 is the eXPropertiesList control, and the Grid1 is the object being queried.
ACC.11:
Usually it is happen when you paste code from the eXHelper
Private Sub Grid1_Click()
    With Grid1
        h = .ItemFromPoint(-1, -1, c, hit)
        Debug.Print (.Items.CellValue(h, c))
    End With
End Sub

and this is happens because the h, c and hit parameters are not declared (properly)

Private Sub Grid1_Click()
    With Grid1
        Dim h As Long, c As Long, hit As Long
        h = .ItemFromPoint(-1, -1, c, hit)
        Debug.Print (.Items.CellValue(h, c))
    End With
End Sub

or

Private Sub Grid1_Click()
    With Grid1
        Dim h As EXGRIDLib.HITEM, c As Long, hit As EXGRIDLib.HitTestInfoEnum
        h = .ItemFromPoint(-1, -1, c, hit)
        Debug.Print (.Items.CellValue(h, c))
    End With
End Sub
ACC.12:
This is usually happen when pasting VB6 code for events in your Access code.

For instance, the VB6 code event is as follow

Private Sub G2antt1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

while in Access the code should look like:

Private Sub G2antt1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Long, ByVal Y As Long)

The VBA Access can automatically generate the event you need to handle, so please follow the steps:

  1. Select the component in design mode,
  2. Right Click, and then Select the Build Event.
  3. Select the G2antt1 component in the first drop down list,
  4. and in the second drop down list, select the MouseMove.

The right syntax for the selected event is being generated and added to the code.

Please pay attention when you copy the code from help files, as sometimes the VB6 code is not exactly the syntax Access is required, as sometimes it gives "User-defines type not defined.", when using wrong syntax for events.

For instance, in VB6 the syntax for BarParentChange event is:

Private Sub G2antt1_BarParentChange(ByVal Item As EXG2ANTTLibCtl.HITEM, ByVal Key As Variant, ByVal NewItem As EXG2ANTTLibCtl.HITEM, Cancel As Boolean)
End Sub
while in Access, the syntax should be:
Private Sub G2antt1_BarParentChange(ByVal Item As Long, ByVal Key As Variant, ByVal NewItem As Long, Cancel As Boolean)
End Sub
ACC.13:
Drag-and-drop is one of the fundamental metaphors underlying the Microsoft� Windows family of operating systems. Users understand that some items can be moved around by holding the mouse down on them, and that they'll get appropriate visual feedback when they're over a spot where the item can be dropped. They expect to be able to move data and images from one spot to another this way. There are two steps required in order to be able to drag and drop items/objects/bars from our /COM components as follows:

Beginning a Drag-and-Drop Operation

To begin a drag-and-drop operation, you have to set the control's OLEDropMode property on 1 and to handle the OLEStartDrag event. The AllowedEffects parameter must be set on 1 or 2, and you need to call the SetData method of the Data parameter so you specify the data to be dragged.

Accepting Data From a Drag Operation

The control fires the OLEDragDrop event, when the user drags data to the control. The OLEDragDrop event occurs when a drag-and-drop operation is in progress (that is, some control has initiated a drag and drop operation) and the cursor enters the control.

The following Access sample shows the requirements in red:

Private Sub Form_Load()
    Grid1.OLEDropMode = exOLEDropManual
End Sub

Private Sub Grid1_OLEDragDrop(ByVal Data As Object, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Long, ByVal Y As Long)
    Dim hI As HITEM
    hI = CLng(Data.GetData(exCFText))
    If (hI <> 0) Then
        With Grid1
            Dim c As Long, hit As HitTestInfoEnum
            Dim h As Long
            h = .ItemFromPoint(-1, -1, c, hit)
            If (h <> 0) Then
                .BeginUpdate
                With .Items
                    .SetParent hI, h
                    .ExpandItem(h) = True
                    .SelectItem(hI) = True
                End With
                .EndUpdate
            End If
        End With
    End If
End Sub

Private Sub Grid1_OLEStartDrag(ByVal Data As Object, AllowedEffects As Long)
    With Grid1
        Dim c As Long, hit As HitTestInfoEnum
        Dim h As Long
        h = .ItemFromPoint(-1, -1, c, hit)
        If (h <> 0) Then
            AllowedEffects = 2
            Data.SetData h, exCFText
        End If
    End With
End Sub

The sample lets user moves an item from another by drag and drop using the SetParent method of Items object. The OLEStartDrag event initiates the OLE Drag-Drop event, by carrying the handle of the item being moved from a parent to the item where the cursor is released.

ACC.14:
You may encounter a crash of MS Access/Excel when passing a local variables to methods of the control. The crash is generally caused due accessing a memory variable that is not valid anymore. The local variables in the event handler are passed by reference instead value. For instance, if you have a Dim s as String, and later you passing this variable to some method, instead the value s, the MS Access passes the reference of the s, which later is not accessible as being most usual declared in the stack. The solution is passing the variables by values, using the CStr function like explained in the following samples.

Let's say that you are adding a new bar when OLEDragDrop event occurs, so your code is:

Private Sub G2antt0_OLEDragDrop(ByVal Data As Object, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Long, ByVal Y As Long)
    Dim h As HITEM
    Dim c As Long, hit As HitTestInfoEnum
    Dim s As String
    If Data.GetFormat(exCFText) Then
        s = Data.GetData(exCFText)
        With G2antt0
            .BeginUpdate
            h = .ItemFromPoint(-1, -1, c, hit)
            If h > 0 And hit = exHTItemChart Then
                With .Items
                    Dim d As Date
                    d = G2antt0.Chart.DateFromPoint(-1, -1)
                    .AddBar h, "Task", d, DateAdd("d", 2, d), s, s
                End With
            End If
            .EndUpdate
        End With
    End If
End Sub

Everything seems to be correct, excepts that MS Access/Excel passes the s local variable as a reference, so when the control is trying to access later, it is not longer valid ( as it is declared in the event's stack), so when the event is done, the address can not be referred anymore. Simple converting the s value to a CStr will create a copy of the string, that for sure will be passed by value, so the code will run just fine.

So finally the change required is replacing the s with CStr(s) as in the following snippet:

Private Sub G2antt0_OLEDragDrop(ByVal Data As Object, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Long, ByVal Y As Long)
    Dim h As HITEM
    Dim c As Long, hit As HitTestInfoEnum
    Dim s As String
    If Data.GetFormat(exCFText) Then
        s = Data.GetData(exCFText)
        With G2antt0
            .BeginUpdate
            h = .ItemFromPoint(-1, -1, c, hit)
            If h > 0 And hit = exHTItemChart Then
                With .Items
                    Dim d As Date
                    d = G2antt0.Chart.DateFromPoint(-1, -1)
                    .AddBar h, "Task", d, DateAdd("d", 2, d), CStr(s), CStr(s)
                End With
            End If
            .EndUpdate
        End With
    End If
End Sub

IN the same context, we can use the Data.GetData directly, as in the following sample:

Private Sub G2antt0_OLEDragDrop(ByVal Data As Object, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Long, ByVal Y As Long)
    Dim h As HITEM
    Dim c As Long, hit As HitTestInfoEnum
    If Data.GetFormat(exCFText) Then
        With G2antt0
            .BeginUpdate
            h = .ItemFromPoint(-1, -1, c, hit)
            If h > 0 And hit = exHTItemChart Then
                With .Items
                    Dim d As Date
                    d = G2antt0.Chart.DateFromPoint(-1, -1)
                    .AddBar h, "Task", d, DateAdd("d", 2, d), Data.GetData(exCFText), Data.GetData(exCFText)
                End With
            End If
            .EndUpdate
        End With
    End If
End Sub
ACC.15:
This is a problem of MS Access environment. While MS Access is executing code during the object's event, all other events of the object are locked, so they will not be fired.

Let's say we have the Microsoft Calendar Control 8.0 ( mscal.ocx ) placed to a form and we have the code:

Private Sub Calendar1_Click()
    Calendar1.Month = 1 + (Calendar1.Month) Mod 12
End Sub

Private Sub Calendar1_NewMonth()
    MsgBox "Calendar1_NewMonth event" & Calendar1.Month
End Sub

The sample should displays a message box when the user clicks the control. In MS Access, the message box never occurs, as the NewMonth event is called during the Click event. If the exactly the same code is called on VB6, VB/NET the MessageBox is shown each time the user clicks the control. In conclusion, the MS Access can not handle events inside other events.

How can we solve this? An idea could be using the form's TimerInterval property which will solve the problem like in the following sample:

Private Sub Calendar1_Click()
    Me.TimerInterval = 10
End Sub

Private Sub Calendar1_NewMonth()
    MsgBox "Calendar1_NewMonth event" & Calendar1.Month
End Sub

Private Sub Form_Timer()
    Me.TimerInterval = 0
    Calendar1.Month = 1 + (Calendar1.Month) Mod 12
End Sub
If we run the sample, the MessageBox occurs each time the user clicks the control, and this is what we intended to do.
ACC.16:
Unfortunately, this error may occur due missing code in the MS Access database. If you got the "An error occurred while loading 'Form_...'. Do you want to continue loading the project?" error, click Yes, and the most probably you get "Compiler Error" right-after at the end of the code, and if you look closely, the code is not complete. In order to fix this, please contact us, and we will provide a different database to include the code for all samples.
ACC.17:
The following error may occur:
if you have installed a newer version of the control, while the form you run has been created / saved with a previously version of the control. In order to solve this error, open the form in design mode, and press CTRL + S (save). This way the new control is serialized on the form, and running again the form will go smootly.
ACC.18:
An application is considered an isolated application if all of its components are side-by-side assemblies. A side-by-side assembly is a collection of resources?a group of DLLs, windows classes, COM servers, type libraries, or interfaces?available for an application to use at runtime. Typically, a side-by-side assembly is one to several DLLs. 

Isolated COM allows your application to use ActiveX components without having to register them. The original vision of this was to allow copy deployment of the application, but Isolated COM has many benefits. You can have a private copy of the DLL without worrying that another application will install an older or newer copy that breaks your application. Isolated COM also allows you to successfully install and run on non-Administrator accounts.

This solution changes the MSACCESS.EXE.manifest file to include the <file> section of the control's manifest:

  • Generates the control's manifest file using the eXHelper tool
    • Open the eXHelper tool, and select the component whose manifest file you need to generate
    • Right-click the Middle/Template panel, and choose the Generate Assembly Manifest (exg2antt.manifest )
    • Copy the <file> section from the manifest file, which should look as:
      <file name="exg2antt.dll" hashalg="SHA1">
      	<comClass clsid="{CD481F4D-2D25-4759-803F-752C568F53B7}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="Exontrol.G2antt.1" description="G2antt Class" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst"></comClass>
      	<comClass clsid="{2DD65709-C0BA-4764-AADF-820919FF181B}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Column.1" description="Column Class" ></comClass>
      	<comClass clsid="{28AC7755-06AC-4439-9ADD-EA012B4B2F10}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Columns.1" description="Columns Class" ></comClass>
      	<comClass clsid="{1801677D-52FE-4759-B10A-C4FE70EAE035}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Items.1" description="Items Class" ></comClass>
      	<comClass clsid="{E2B55693-3D70-426B-9E08-ECF9DC93D98D}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.OleEvent.1" description="OleEvent Class" ></comClass>
      	<comClass clsid="{919D16E8-2002-4C11-BC81-1CA0FF8FDDEF}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.OleEventParam.1" description="OleEventParam Class" ></comClass>
      	<comClass clsid="{C39F7717-C8C1-44A0-A495-DB5E92FDC79D}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Appearance.1" description="Appearance Class" ></comClass>
      	<comClass clsid="{9E3FB380-6CB7-4CCA-B726-FE191133A8A0}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.ExDataObjectFiles.1" description="ExDataObjectFiles Class" ></comClass>
      	<comClass clsid="{A30C0D8D-98A5-476B-860A-3397645BA8F8}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.ExDataObject.1" description="ExDataObject Class" ></comClass>
      	<comClass clsid="{4B82A833-421F-496F-BE2F-F5C41DBED707}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}"  description="Template Class" ></comClass>
      	<comClass clsid="{D4D088E8-0FA5-4414-A322-D105149D6313}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}"  description="TemplatePage Class" ></comClass>
      	<comClass clsid="{1AA7ABFA-8C27-4579-9F06-7CCFAF301B72}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Editor.1" description="Editor Class" ></comClass>
      	<comClass clsid="{23AA3A91-C107-44B2-BD23-3978B343DB8A}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Chart.1" description="Chart Class" ></comClass>
      	<comClass clsid="{7862FEFF-7FE6-401A-A692-CE4758CDD0FC}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Level.1" description="Level Class" ></comClass>
      	<comClass clsid="{D6C57467-EC60-429F-87B7-3751DFB1EEAE}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Bar.1" description="Bar Class" ></comClass>
      	<comClass clsid="{75A35E6C-2144-435F-96FF-0BE4A9643176}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Bars.1" description="Bars Class" ></comClass>
      	<comClass clsid="{FC5F6509-4354-4D92-A9A9-24EEB081670E}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.ConditionalFormat.1" description="ConditionalFormat Class" ></comClass>
      	<comClass clsid="{DEDF38EB-BEEA-48D1-8D9E-AF0C81FA8E71}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.ConditionalFormats.1" description="ConditionalFormats Class" ></comClass>
      	<comClass clsid="{91E561B9-B514-4F1F-BAE1-3E5903C85DA3}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.InsideZoomFormat.1" description="InsideZoomFormat Class" ></comClass>
      	<comClass clsid="{513CF640-A498-4800-ACEF-4473491CF282}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.InsideZoom.1" description="InsideZoom Class" ></comClass>
      	<comClass clsid="{B6528DA9-8C75-4389-9B72-EE8A8C2BABA3}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.InsideZooms.1" description="InsideZooms Class" ></comClass>
      	<comClass clsid="{15F8B91F-49AD-4663-B878-8A3DE05E4A30}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Notes.1" description="Notes Class" ></comClass>
      	<comClass clsid="{926F669D-85C4-4D6D-BC9D-BA3759D8B237}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Note.1" description="Note Class" ></comClass>
      	<typelib tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" version="1.0" helpdir="" flags="HASDISKIMAGE"></typelib>
      </file>
  • Locate/Creates the MSACCESS.EXE.manifest, and adds the <file> section before /assembly ends as shown bellow ( the MSACCESS.EXE.manifest file should be located in the same folder where the MSACCESS.EXE executable is ):
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
	<assemblyIdentity processorArchitecture="x86" type="win32" name="msaccess" version="12.0.0.0"></assemblyIdentity>
	<description>Microsoft Office Access</description>
	<dependency>
		<dependentAssembly>
			<assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
		</dependentAssembly></dependency>
		<dependency>
			<dependentAssembly>
				<assemblyIdentity type="win32" name="AceDAO" version="12.0.0.0" language="*" processorArchitecture="X86"></assemblyIdentity>
			</dependentAssembly>
		</dependency>
		<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
			<security>
				<requestedPrivileges>
					<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
				</requestedPrivileges>
			</security>
		</trustInfo>
	<file name="exg2antt.dll" hashalg="SHA1">
		<comClass clsid="{CD481F4D-2D25-4759-803F-752C568F53B7}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="Exontrol.G2antt.1" description="G2antt Class" miscStatusContent="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst"></comClass>
		<comClass clsid="{2DD65709-C0BA-4764-AADF-820919FF181B}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Column.1" description="Column Class" ></comClass>
		<comClass clsid="{28AC7755-06AC-4439-9ADD-EA012B4B2F10}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Columns.1" description="Columns Class" ></comClass>
		<comClass clsid="{1801677D-52FE-4759-B10A-C4FE70EAE035}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Items.1" description="Items Class" ></comClass>
		<comClass clsid="{E2B55693-3D70-426B-9E08-ECF9DC93D98D}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.OleEvent.1" description="OleEvent Class" ></comClass>
		<comClass clsid="{919D16E8-2002-4C11-BC81-1CA0FF8FDDEF}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.OleEventParam.1" description="OleEventParam Class" ></comClass>
		<comClass clsid="{C39F7717-C8C1-44A0-A495-DB5E92FDC79D}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Appearance.1" description="Appearance Class" ></comClass>
		<comClass clsid="{9E3FB380-6CB7-4CCA-B726-FE191133A8A0}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.ExDataObjectFiles.1" description="ExDataObjectFiles Class" ></comClass>
		<comClass clsid="{A30C0D8D-98A5-476B-860A-3397645BA8F8}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.ExDataObject.1" description="ExDataObject Class" ></comClass>
		<comClass clsid="{4B82A833-421F-496F-BE2F-F5C41DBED707}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}"  description="Template Class" ></comClass>
		<comClass clsid="{D4D088E8-0FA5-4414-A322-D105149D6313}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}"  description="TemplatePage Class" ></comClass>
		<comClass clsid="{1AA7ABFA-8C27-4579-9F06-7CCFAF301B72}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Editor.1" description="Editor Class" ></comClass>
		<comClass clsid="{23AA3A91-C107-44B2-BD23-3978B343DB8A}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Chart.1" description="Chart Class" ></comClass>
		<comClass clsid="{7862FEFF-7FE6-401A-A692-CE4758CDD0FC}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Level.1" description="Level Class" ></comClass>
		<comClass clsid="{D6C57467-EC60-429F-87B7-3751DFB1EEAE}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Bar.1" description="Bar Class" ></comClass>
		<comClass clsid="{75A35E6C-2144-435F-96FF-0BE4A9643176}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Bars.1" description="Bars Class" ></comClass>
		<comClass clsid="{FC5F6509-4354-4D92-A9A9-24EEB081670E}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.ConditionalFormat.1" description="ConditionalFormat Class" ></comClass>
		<comClass clsid="{DEDF38EB-BEEA-48D1-8D9E-AF0C81FA8E71}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.ConditionalFormats.1" description="ConditionalFormats Class" ></comClass>
		<comClass clsid="{91E561B9-B514-4F1F-BAE1-3E5903C85DA3}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.InsideZoomFormat.1" description="InsideZoomFormat Class" ></comClass>
		<comClass clsid="{513CF640-A498-4800-ACEF-4473491CF282}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.InsideZoom.1" description="InsideZoom Class" ></comClass>
		<comClass clsid="{B6528DA9-8C75-4389-9B72-EE8A8C2BABA3}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.InsideZooms.1" description="InsideZooms Class" ></comClass>
		<comClass clsid="{15F8B91F-49AD-4663-B878-8A3DE05E4A30}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Notes.1" description="Notes Class" ></comClass>
		<comClass clsid="{926F669D-85C4-4D6D-BC9D-BA3759D8B237}" tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" progid="ExG2antt.Note.1" description="Note Class" ></comClass>
		<typelib tlbid="{70337FFD-810F-4CDC-B09A-44CDCEE7DF1B}" version="1.0" helpdir="" flags="HASDISKIMAGE"></typelib>
	</file>
</assembly>
  • Save the MSACCESS.EXE.manifest file
  • Copy the exd2antt.dll to the Microsoft Office Folder ( the same folder where the MSACCESS.EXE and MSACCESS.EXE.manifest are, like C:\Program Files (x86)\Microsoft Office\Office12 )
  • Run the sample.accdb

You can download here all you need to run the sample.accdb that uses the exg2antt/com component as isolated/com.

See also: How to Generate Assembly Manifest File (Registration-Free)?

ACC.19:
The MS Access allows using the component into its environment, by providing an extended object that provides properties like Name, Visible, and so on which encapsulate the component under the Object property. When a property is invoked, first the extended object is queried, and after that the object itself is queried for it. In order to prevent confusion of some properties like Layout, you can use the Object property to access directly the component, and so to directly call the component's property like in the following samples:

So, instead of:

Grid1.Layout = "singlesort=""C0:2"""

you should call as:

Grid1.Object.Layout = "singlesort=""C0:2"""
ACC.20:
Yes. You can test your application that uses any of our evaluation version. Please check also What files do I need to install on the client machine?

Because MS Access is not able to handle runtime-licensed controls we offer you (free of charge) the runtime-less version of the component you purchased from us. The runtime-less version of the registered component is exactly the same as the one you evaluated, which means it works on the client machine using your MS Access application.

Please contact us ASAP and provide the following information:

  • Company
  • Address
  • City
  • Country

Based on the information you provide we will build and send you (within 1 to 3 working days) a new update that includes the runtime-less version of the component, that can be used on your MS Access environment. The new update includes the information you provided in the License page of the DLL, as you can see bellow:

ACC.21:
This is usually happen when pasting VBA code for events in your Access code (UserForm). In MS Access the syntax for a specified event may differ if the event is used within a form or a userform.

For instance, the DblClick event for a form is

Private Sub Grid1_DblClick(ByVal Shift As Integer, ByVal X As Long, ByVal Y As Long)

while within a UserForm should be:

Private Sub Grid1_DblClick(ByVal Shift As Integer, ByVal X As stdole.OLE_XPOS_PIXELS, ByVal Y As stdole.OLE_YPOS_PIXELS)

The VBA UserForm can automatically generate the event you need to handle, so please follow the steps:

  1. Right Click the userform and select View Code
  2. In the left-top corner you can find the list of objects the current userform includes (General), so select Grid1
  3. The right side drop down lists all available events you can insert, so select DblClick

The right syntax for the selected event is being generated and added to the code.

The VBA Form can automatically generate the event you need to handle, so please follow the steps:

  1. Select the component in design mode,
  2. Right Click, and then Select the Build Event.
  3. Select the Grid1 component in the first drop down list,
  4. and in the second drop down list, select the DblClick.

The right syntax for the selected event is being generated and added to the code.

Please pay attention when you copy the code from help files, as sometimes the VB6 code is not exactly the syntax Access is required, as sometimes it gives "User-defines type not defined.", when using wrong syntax for events.

For instance, in VB6 the syntax for BarParentChange event is:

Private Sub G2antt1_BarParentChange(ByVal Item As EXG2ANTTLibCtl.HITEM, ByVal Key As Variant, ByVal NewItem As EXG2ANTTLibCtl.HITEM, Cancel As Boolean)
End Sub
while in Access, the syntax should be:
Private Sub G2antt1_BarParentChange(ByVal Item As Long, ByVal Key As Variant, ByVal NewItem As Long, Cancel As Boolean)
End Sub
ACC.22:
The Change event occurs once the user changes the value of a cell. The problem occurs because during the Change event the Clear method deletes also the cell being edited. You should use a timer to avoid this situation like in the following sample:
Private Sub Form_Timer()
    Me.TimerInterval = 0
    Me.Grid1.Columns.Clear
End Sub

Private Sub Grid1_Change(ByVal Item As Long, ByVal ColIndex As Long, NewValue As Variant)
    TimerInterval = 16
End Sub
ACC.23:
The Locked property of the control is confused with the Locked property of the extended control (host of the control itself), so in order to prevent that you have to use the following syntax:
.Object.Locked = true
instead of
.Locked = true
ACC.24:

In the Form Designer (Microsoft Access), I don't see any event for the control, excepts Updated, Enter, Exit, Got Focus and Lost Focus. No events such as MouseMove, KeyDown, KeyUp and so on.

The control's events are not available in the Form Designer (Microsoft Access), instead they are available within the Microsoft Visual Basic code builder.

In order to attach an event to the control, you can do the following:

  • select the control in design mode
  • right click, select Build Event (code builder) so the Microsoft Visual Basic code builder is opened
  • select the control in the left drop down control
  • select the event within the second drop down control

as shown in the following picture:

ACC.25:

In design mode, remove the control from the form and insert it again. Resize and move the control at desired position and save it. Run the form and the new position and size is correct.

ACC.26:

"Native 64-bit processes in Office cannot load 32-bit binaries. This includes the common controls of MSComCtl (TabStrip, Toolbar, StatusBar, ProgressBar, TreeView, ListViews, ImageList, Slider, ImageComboBox) and the controls of MSComCt2 (Animation, UpDown, MonthView, DateTimePicker, FlatScrollBar). These controls were installed by 32-bit versions of Office earlier than Office 2010. You'll need to find an alternative for your existing VBA solutions that use these controls when you migrate the code to the 64-bit versions of Office."

quote from:

Compatibility between the 32-bit and 64-bit versions of Office

Just because the ImageList control is absent on 64-bit systems doesn't imply that you can't utilize or showcase images or icons within our controls. All of our UI controls provide methods such as:
  • Images method, loads one or more icons from different type of sources (ICO-file, BASE64 encoded image list, ImageList controls, Picture objects, and so on)
  • ReplaceIcon method, adds a new icon, replaces an icon or clears the control's image list. For instance the ReplaceIcon 0, -1 clears the control's Images collection
  • ShowImageList property (available in design mode only), shows or hides the control's images list in design mode

See also:

ACC.27:

Despite selecting 'Yes' to Access's prompt asking, 'Do you want to save changes to the design of the form...,' the control properties remain unchanged the next time I open the form.

In order to hard saving the properties you can do the following:

  • Go to design mode
  • Select the control
  • Change any property of the control (for instance, change the ShowImageList to Yes, and drag icons to the control's images collection)
  • Press CTRL + X, so the control is removed from the form
  • Press CTRL + Z, the control is restored
  • Press CTRL + S to save the form and close it

In this manner, all properties of the control are being saved to the form's persistence.