Use VBA function "RGB" to assign a color to a property. The color "red", for example, is
represented as follows: RGB(255, 0, 0)
Example:
The "SliderConfiguration()" procedure accesses the properties of the slider. In this example
the color of the top part of the slider will be set to "Yellow":
Sub SliderConfiguration()
'VBA397
Dim objSlider As HMISlider
Set objSlider = ActiveDocument.HMIObjects.AddHMIObject("SliderObject1", "HMISlider")
With objSlider
.BackColorTop = RGB(255, 255, 0)
End With
End Sub
See also
Slider object (Page 1952)
BackFlashColorOff Property
Description
Defines or returns the color of the object background for the flash status "Off". LONG write-
read access.
Determination of Color Value
The color is displayed in RGB format (Red, Green, Blue). Specify the corresponding decimal
value for each of the three RGB values (value range from 0 to 255).
Use VBA function "RGB" to assign a color to a property. The color "red", for example, is
represented as follows: RGB(255, 0, 0)
Example:
The "RectangleConfiguration()" procedure accesses the properties of the rectangle. In this
example the color when the flash status is "Off" will be set to "Yellow":
Sub RectangleConfiguration()
'VBA398
Dim objRectangle As HMIRectangle
Set objRectangle = ActiveDocument.HMIObjects.AddHMIObject("Rectangle1", "HMIRectangle")
With objRectangle
.BackFlashColorOff = RGB(255, 255, 0)
VBA for Automated Configuration
4.4 The object model of the Graphics Designer
MDM - WinCC: Scripting (VBS, ANSI-C, VBA)
System Manual, 11/2008,
2021