Hi,
I have created a rectangle on the screen called Rect1 using Insert Shapes. I want to pass this control through to a sub so I can then access its foregroundcolor property in the code.
So for example I have an event control that executes on change of a historical tag.
This calls the sub changeGMLastChangedColor which then needs to allow me to use the foregroundcolor of the tagName
The code shown doesn't work, how can I change it to make it work?
Thanks
End Sub[/CODE]
I have created a rectangle on the screen called Rect1 using Insert Shapes. I want to pass this control through to a sub so I can then access its foregroundcolor property in the code.
So for example I have an event control that executes on change of a historical tag.
Code:
Private Sub OptAGMChangeColor_DataChange(ByVal DataValue As Variant, ByVal TimeStamp As Date, ByVal Transition As Long, ByVal Reserved As Variant)
tagName = rect1.Name
Call changeGMLastChangedColor(tagName)
End Sub
Code:
Public Sub changeGMLastChangedColor(ByVal tagName As String)
tagName.ForegroundColor = vbGreen
End Select
The code shown doesn't work, how can I change it to make it work?
Thanks
End Sub[/CODE]