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
-
7:31
Shane Welcher
2 years ago $0.02 earnedAllen-Bradley Servo Motion Gearing
27 -
4:10:32
Nerdrotic
6 hours ago $9.82 earnedHollywood's DOOMSDAY! WB FIRESALE! - Friday Night Tights 385 w Zachary Levi
50.3K8 -
12:25:53
LFA TV
17 hours agoLIVE & BREAKING NEWS! | FRIDAY 12/19/25
182K26 -
1:08:59
Edge of Wonder
3 hours agoNASA’s Intergalactic Spacecraft, Real Dwarves Spotted & Research Roundup
4.39K2 -
1:21:27
Kim Iversen
6 hours agoPutin Says Russia is Ready for WAR With Europe
29.2K75 -
1:24:41
The Daily Signal
4 hours ago $2.74 earned🚨BOMBSHELL: 315,000+ Illegal Ballots in Georgia, Terrorists Released, Rubio Slashes Foreign Aid
17.7K9 -
1:53:45
The Mike Schwartz Show
6 hours agoTHE MIKE SCHWARTZ SHOW Evening Edition 12-19-2025
13.2K4 -
37:38
The Nunn Report - w/ Dan Nunn
5 hours ago[Ep 814] LIVE From AmFest 2025 with Kaitlin Bennett
39.7K12 -
27:40
Stephen Gardner
7 hours agoYES! Rubio & Hegseth Get Trump's 2 National Security Orders
48.7K42 -
1:48:18
vivafrei
7 hours agoBrown Shooter Identified - Suspect or Patsy? Judge CONVICTED for Aiding Illegals! Bongino Resigns!
65K57