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:41
Shane Welcher
1 year agoScaling a PIDE Output for a 4 to 20MA signal
28 -
54:28
LFA TV
1 day agoUnjust Man | TRUMPET DAILY 2.27.25 7PM
19.7K2 -
DVR
CatfishedOnline
7 hours ago $1.19 earnedGoing Live With Allen Weekly Recap
21.8K -
20:10
CartierFamily
7 hours agoAndrew Schulz DESTROYS Charlamagne’s WOKE Meltdown on DOGE & Elon Musk!
36.8K45 -
1:36:39
Redacted News
5 hours agoBOMBSHELL EPSTEIN SH*T SHOW JUST DROPPED ON WASHINGTON, WHAT IS THIS? | Redacted w Clayton Morris
145K242 -
2:03:31
Revenge of the Cis
6 hours agoEpisode 1453: Fat & Fit
48.6K8 -
2:38:12
The White House
7 hours agoPresident Trump Holds a Press Conference with Prime Minister Keir Starmer of the United Kingdom
160K60 -
1:01:04
In The Litter Box w/ Jewels & Catturd
1 day agoDrain the Swamp! | In the Litter Box w/ Jewels & Catturd – Ep. 751 – 2/27/2025
91.7K35 -
1:11:24
Dr. Drew
8 hours agoNEW: Cardiac Arrest In Healthy Young People After mRNA w/ Nicolas Hulscher – Ask Dr. Drew
72.7K32 -
4:24:53
Right Side Broadcasting Network
12 hours agoLIVE REPLAY: President Trump and UK Prime Minister Starmer Meet and Hold a Press Conference 2/27/25
166K47