AlexT
  • AlexT
  • Member Topic Starter
2017-11-14T16:59:16Z
Hello

I am trying to write a more or less generic procedure to work with iGrid objects that would be passed a a parameter.

As such I am defining my procedure as

sub refreshSPECIFICInstrumentList(ByRef prmGrid As iGrid650_10Tec.iGrid)

this compiles fine but some properties are missing (for instance the .Tag property)

Missing param

What am I missing ?
Igor/10Tec
2017-11-15T15:20:56Z
iGrid does not implement the Tag property itself. Most likely, you've seen it in VB6, but this is one of the so called extender properties provided dynamically by the host environment. This means it may be absent in other development environments like VBA.

To find out more about extender properties, read the following MSDN articles:

Visual Basic Concepts: Understanding the Container’s Extender Object
https://msdn.microsoft.com/en-us/library/aa733622 

Visual Basic Reference: Extender Object
https://msdn.microsoft.com/en-us/library/aa267211 
AlexT
  • AlexT
  • Member Topic Starter
2017-11-15T16:37:53Z
Originally Posted by: Igor/10Tec 

iGrid does not implement the Tag property itself. Most likely, you've seen it in VB6, but this is one of the so called extender properties provided dynamically by the host environment. This means it may be absent in other development environments like VBA.



Hmm strange.

Using VBA / Excel 2007 I certainly see it in the property panel and I can refer to it in code

iGrid Tag
Igor/10Tec
2017-11-15T17:20:30Z
Oh, it's a specific way of processing form controls in VBA code. You need to do something like this:

Private Sub CommandButton1_Click()
    ProcessGrid iGrid1
End Sub

Private Sub ProcessGrid(grid As Control)
    MsgBox grid.Tag
End Sub

As I wrote, the iGrid class does not implement the Tag property - and that's why the compilation of your code fails. The Tag is also an extender property in VBA, and to access it, you need to look through the prism of the Control class.