Premium Only Content

Get Computer Name with VBA Code using FactoryTalk View Studio Site Edition
Adding a text element in your HMI application that is used in the VBA code to display your computer name instead of the text inside the text element by setting Expose To VBA to VBA Control.
1. Create a Text object on your SE graphic display.
2. Once this object is created, right-click on it and select Property Panel
3. Set the ExposeToVBA property to VBA Control
4. Add the following code to your graphic’s AnimationStart event. In this example, the name of the Text object is StationName:
Private Sub Display_AnimationStart()
StationName.Caption = Environ("COMPUTERNAME")
End Sub
0:00 Quick Intro
0:53 Adding the Text Element
1:35 Changing the name of the Text element
2:30 Expose to VBA set to VBA Control
3:15 Opening VBA code
3:40 Find Display Animation
4:00 Writing the VBA code
5:35 Fixing the compile error - I had a fat finger moment
6:17 Explaining the VBA code in-depth
6:30 Testing the VBA code
7:45 Launching the HMI client for another test
8:28 Recommended videos for you
I hope it helped.
Thank you for watching the video.
Learn, Implement, Succeed
Visit:
https://www.allen-bradley-plc-training.com/
Other social media:
LinkedIn: https://www.linkedin.com/in/shane-welcher-sr/
Facebook: https://www.facebook.com/OnlinePLCSupport
#VBAcode #ExposeToVBA #VBAcontrol #FactoryTalk
-
2:05
Shane Welcher
1 year ago $0.02 earnedPLC Program IO Tree Troubleshooting Using Studio 5000
108 -
28:26
DeVory Darkins
13 hours ago $12.94 earnedDemocrats BEG FOR MERCY after Kimmel suspension as Trump drops bomb on terrorist left
162K88 -
8:07
The Officer Tatum
17 hours agoScott Jennings UNLEASHES On CNN Panel FEELING SORRY FOR SHOOTER
130K132 -
2:05:40
Inverted World Live
11 hours agoThe Simulation is Burning & Missile Hits UFO in China | Ep. 110
164K24 -
2:00:48
The Charlie Kirk Show
9 hours agoTHOUGHTCRIME Ep. 97 — The Thoughtcrime WILL Continue
144K103 -
35:08
Colion Noir
14 hours agoA Bear, an AR-15, and a Home Invasion
48.2K7 -
3:05:55
TimcastIRL
10 hours agoJimmy Kimmel Refuses To Apologize Over Charlie Kirk Comments, Blames Gun Violence | Timcast IRL
215K200 -
2:44:24
Laura Loomer
13 hours agoEP144: Trump Cracks Down On Radical Left Terror Cells
66.1K27 -
4:47:56
Drew Hernandez
15 hours agoLEFTISTS UNITE TO DEFEND KIMMEL & ANTIFA TO BE DESIGNATED TERRORISTS BY TRUMP
56.1K25 -
1:12:32
The Charlie Kirk Show
11 hours agoTPUSA AT CSU CANDLELIGHT VIGIL
122K62