Back

Topic

[KB506]How to access a VBA graphic object

Tags: Scripting, VBA

13 years ago
By ED
Options
Print
Applies to:

PcVue version 8.10 onwards


Summary:

Syntax to access a graphic object using a string variable


Details:

Please note that the graphic object does not have to be ticked as VBA control with this method. Therefore the mimic loading time is improved.

  • If the code is in the mimic context:

Dim strObjectName As String
strObjectName = “Shape1”
Me.Graphics(strObjectName).Width = 10

  • If the code is outside the mimic context:

Dim strObjectName As String
strObjectName = “Shape1”
Mimics(“MyMimic”).Graphics(strObjectName).Width = 10

 

Created on: 30 Sep 2011 Last update: 13 May 2024