Skip to content
jpimbert edited this page Aug 28, 2013 · 3 revisions

Where ton install the Addins for use with Excel and other Microsoft application ?

  • into C:/Documents and Settings/xxx/Application Data/Microsoft/AddIns
  • they have to be .xla files for use by Excel

Le fichier des macros personnelles est PERSONAL.XLSB et se situe dans C:/Documents and Settings/xxx/Application Data/Microsoft/Excel/XLSTART

Activation de AddIn

Utilisation de références dans VBA (pour pouvoir accéder aux objets dans le code)

Define a default property or method

We can define a default property for an object class. For example, in the class vtkConfigurationManager, the property projectName is defined as the default property. This means that we can write cm = "ProjectName" instead of cm.projectName = "MyProject".
There is no tool in VBAIDE to define a default method or property. We have to export the class module, modify it, then re-import it. The modification is only to add Attribute Value.VB_UserMemId = 0 as the first line of the method:

Public Property Get projectName() As String
    Attribute Value.VB_UserMemId = 0
    projectName = m_projectName
End Property

Set the Property Get method as the default will also set the Property Let.
WARNING At the moment, this setting have to be done after each exportation of the module. The automation will be included in a future release of VBAToolKit.