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
-
5:21
Shane Welcher
5 months agoRockwell Automation's Studio 5000 V30 Servo Motion Group Not Synced
5 -
DVR
The Quartering
2 hours agoThe World Is On Fire
24.8K21 -
44:41
Kimberly Guilfoyle
5 hours agoTrump Rally in the Bronx, MAGA Momentum in Deep Blue New York, Live with Mike Davis & Karoline Leavitt | Ep. 128
33.9K47 -
LIVE
LFA TV
13 hours agoTRUMP BRONX RALLY LIVE! | CULTURE WARS 5.23.24 6pm EST
4,285 watching -
1:03:01
TheMonicaCrowleyPodcast
3 hours agoThe Monica Crowley Podcast: The Out of Control Regime
12.4K3 -
1:29:15
Redacted News
5 hours agoAmerica's Electric Grid is Facing Summer CATASTROPHE, Democrats now the party of war | Redacted Live
66.5K173 -
1:36:55
Michael Franzese
4 hours agoSitdown with Tristan Tate | Michael Franzese
40.3K9 -
2:16:52
Drunk3PO
5 hours agoEpicverse Blood & Water Reaction and More | High-T with Fear the Beardo & Drunk3po Live
27.1K -
15:50
Stephen Gardner
3 hours ago🔴Biden RAGES after SECRET CIA order LEAKS!!
17.7K13 -
2:19:35
Tucker Carlson
6 hours agoPatrick Bet-David on Trump, Iran, and What Chris Cuomo Should Do with the Rest of His Life
147K259