Hello group,
I have been migrating a project from RSView 32 V7.6 to FactoryTalk View SE Local Station V12 over the last couple of days. All told, it has gone quite well all things considered. I have one minor complaint that I can't seem to figure out. Is it possible to have a new VBA Sub insert itself into the bottom of the editor rather than between my Option Explicit and Private Sub Display_AnimationStart() at the top? I would like to have the animation subs at top, my function below those, and then all of my pushbuttons at the bottom. I have over 70 buttons that are going to send parameters to my function, and it is really annoying to have to cut and paste constantly, especially as my document gets longer. I am replacing rectangles that used to be used as pushbuttons with pushbuttons one at a time since polygons don't have a "released" property. Since there are so many buttons, I am adding them one at a time, and then doing the VBA for each as I go.
For example:
Is there an option somewhere that will automatically insert new items in the blue area? It should be mentioned that I have been adding the buttons to the screen, right clicking the new button and then selecting VBA Code... so that it sets the ExposeToVBA property automatically for me. I guess I am just looking for the laziest way to do this.
I have been migrating a project from RSView 32 V7.6 to FactoryTalk View SE Local Station V12 over the last couple of days. All told, it has gone quite well all things considered. I have one minor complaint that I can't seem to figure out. Is it possible to have a new VBA Sub insert itself into the bottom of the editor rather than between my Option Explicit and Private Sub Display_AnimationStart() at the top? I would like to have the animation subs at top, my function below those, and then all of my pushbuttons at the bottom. I have over 70 buttons that are going to send parameters to my function, and it is really annoying to have to cut and paste constantly, especially as my document gets longer. I am replacing rectangles that used to be used as pushbuttons with pushbuttons one at a time since polygons don't have a "released" property. Since there are so many buttons, I am adding them one at a time, and then doing the VBA for each as I go.
For example:
Code:
Option Explicit
Dim gpGroup As TagGroup
[COLOR="Red"]New Subs insert here automatically[/COLOR]
Private Sub Display_AnimationStart()
On Error GoTo Blah
Dim things
Do Stuff
Exit Sub
Blah:
log my error
End Sub
Private Sub Display_BeforeAnimationStop()
Do More things
End Sub
Private Function OneFunctionToDoLiterallyEverything(P1 as String, P2 as Integer)
Do function things
End Function
Private Sub Button1_Released()
Button sends parameters to function.
End Sub
[COLOR="Blue"]This is where I would like new subs to be inserted.[/COLOR]
Is there an option somewhere that will automatically insert new items in the blue area? It should be mentioned that I have been adding the buttons to the screen, right clicking the new button and then selecting VBA Code... so that it sets the ExposeToVBA property automatically for me. I guess I am just looking for the laziest way to do this.