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
-
3:59
Shane Welcher
9 months agoStudio 5000 Download Failed - Communications Timed Out
32 -
35:00
My Self Reliance
11 hours agoHand-Built Stone Chicken Coop: Ultimate DIY Project for My Permaculture Homestead
45.5K75 -
1:43:48
Bright Insight
14 hours agoWhat You Must Know about Graham Hancock/Flint Dibble Debate (w/ @DeDunking)
66.7K78 -
1:21:47
LFA TV
21 hours agoBIDEN DIES AS TRUMP THRIVES Ft. Jeremy Herrell & Liz Willis | LAST CALL 6.29.24 8PM EST
102K71 -
28:53
Stephen Gardner
15 hours ago🔴JUST NOW: HUGE Trump WIN I didn’t expect | White House MELTDOWN over Joe’s health scare
88.3K527 -
1:46:49
Jewels Jones Live ®
1 day agoSCOTT PRESLER - THE PERSISTENCE | A Political Rendezvous - Ep. 82
99.3K40 -
55:02
The Kirk Minihane Show
18 hours agoCinema Lords House of the Dragon Review
95.1K5 -
38:24
LenaPetrova
21 hours ago🚨 Project mBRIDGE Explained: BRICS, Multi Currency Reality Via New Blockchain Settlement System
69.8K10 -
9:43
China Uncensored
16 hours ago $3.99 earnedChina's Economy is in Free Fall
83.9K25 -
3:25:44
Making Art
19 hours ago $17.77 earnedLive Painting - Making Art 6-29-24 - Morning Coffee Paint Sesh
98.8K38