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:12
Shane Welcher
1 year agoPIDE 4 to 20MA signal Reverse Reacting
104 -
1:00:32
VINCE
5 hours agoRest In Peace Charlie Kirk | Episode 123 - 09/11/25
379K347 -
LIVE
LFA TV
8 hours agoLFA TV ALL DAY STREAM - THURSDAY 9/11/25
4,122 watching -
LIVE
Bannons War Room
6 months agoWarRoom Live
7,599 watching -
25:21
The Shannon Joy Show
3 hours agoA message of encouragement and a call for faith and unity after the tragic killing of Charlie Kirk
65.3K14 -
1:31:37
The Big Mig™
4 hours agoIn Honor Of Charlie Kirk, Rest In Peace 🙏🏻
54K17 -
1:36:35
The White House
5 hours agoPresident Trump and the First Lady Attend a September 11th Observance Event
127K49 -
1:38:49
Dear America
5 hours agoWe Are ALL Charlie Now! This Isn’t The End. We Will FIGHT FIGHT FIGHT
203K206 -
2:09:21
Badlands Media
12 hours agoBadlands Daily: September 11, 2025
78.2K23 -
2:59:26
Wendy Bell Radio
9 hours agoA Watershed Moment
96.5K219