cmac2425
Lifetime Supporting Member
I am trying to convert my RSView 32 project into FactoryTalk View 6.1 SE. I have converted everything but left the VB until last. I have my code in where it needs to be but I cannot execute it. I used to use the VBAExec function in RSView but that is not in FT 6.1. I have listed my code below, just trying to call the subroutine NumericDisplay2Change. Is there any ideas out there on how to do it? I place this code in VB and use a push button to call a macro, which in turn calls the VB. Thanks in advance!
[FONT="]Private Sub NumericDisplay2Change()[/FONT]
[FONT="]On Error GoTo ErrorHandler[/FONT]
[FONT="]If Not IsError(NumericDisplay2.Value) Then[/FONT]
[FONT="]If NumericDisplay2.Value = 1 Then[/FONT]
[FONT="] ExecuteCommand "&Set TEST_1 9"[/FONT]
[FONT="] End If[/FONT]
[FONT="] End If[/FONT]
[FONT="] Exit Sub[/FONT]
[FONT="]ErrorHandler:[/FONT]
[FONT="] LogDiagnosticsMessage Err.Description, ftDiagSeverityError[/FONT]
[FONT="]End Sub[/FONT]
[FONT="]Private Sub NumericDisplay2Change()[/FONT]
[FONT="]On Error GoTo ErrorHandler[/FONT]
[FONT="]If Not IsError(NumericDisplay2.Value) Then[/FONT]
[FONT="]If NumericDisplay2.Value = 1 Then[/FONT]
[FONT="] ExecuteCommand "&Set TEST_1 9"[/FONT]
[FONT="] End If[/FONT]
[FONT="] End If[/FONT]
[FONT="] Exit Sub[/FONT]
[FONT="]ErrorHandler:[/FONT]
[FONT="] LogDiagnosticsMessage Err.Description, ftDiagSeverityError[/FONT]
[FONT="]End Sub[/FONT]