Hello,
I have an image in my project that I want to change out depending on user name. I did not want to imput the full user name - just limit to the first 4 or 5 letters. Then, If not WELL or ITAD then use this image. Is there a better way to do this. The below code does not work with error; Line 5: Argument must be of type String. Any help would be great - Thanks
Code:--Get user name NAME = System.GetUserInfo(); NAME1 = (NAME.User); -- (2) Narrow Result to the first 4 letters NAME1 = String.Mid(NAME1, 1, 4); -- (3) Compare and change image if NAME1 == "well" then Image.Load("Image16", "AutoPlay\\Images\\User.png"); elseif NAME1 == "itad" then Image.Load("Image16", "AutoPlay\\Images\\Secuty-agent.png"); elseif NAME1 == "" then Image.Load("Image16", "AutoPlay\\Images\\People.png"); end

Reply With Quote