Vb Script For Unique Picture For User Follow

0
Avatar
Legacy Poster

I've been working with BarTender for a while now, but I've hit a roadblock and I was told that the only way to solve it is through VB Script. However, I have never used VB script and probably don't have the time to learn it to the point I need to.

 

Question is: How can I make a label load a unique picture determined by the user of the computer?

 

Example: Johnny logs on, and the picture in the label is an apple. Karen logs on, and the picture is a fish. (A very childish example)

 

Any ideas? It would be MUCH appreciated.

 

Thank you.

2 comments

0
Avatar
Ian Cummings
Moderator
Comment actions Permalink

Yes, VB Script will be needed.

 

Create a new picture object that uses a data source.  Set the path for the picture files folder, and for the picture file name choose the multi line or event based VB script data source.  Edit the script to have a conditional Select...Case statement like below where you test the "Application.SystemUserName" property value to get the user of who is logged into Windows:

 

Select Case Application.SystemUserName
	Case "Johnny"
	     value = "Apple.jpg"
	Case "Karen"
             value = "Fish.jpg"
End Select
0
Avatar
Legacy Poster
Comment actions Permalink

That worked fantastically! Thank you so much!

Please sign in to leave a comment.