I have a program that is used as a client login (electronic sign-in sheet). The opening screen is a UserForm where the client enters their ID #. On this screen I also have a Label control that displaces important information to the client. The information being displayed in the Label changes regularly. I would like for the employee that maintains the login program to be able to update the Label information without going into the VBA code. I have a tab labeled "Variables" which currently contains information that I use to populate several Combo Box controls. Is there a way to populate the text on the Label using one of the cells on the "Variables" tab?
I thought this would be as simple as it is to populate the Combo Boxes, but so far I have not come up with the right code to do it. I have done several searches and have not found anything that has given me the answer I am needing. Any help will be greatly appreciated.
Last edited by boylejob; 02-05-2012 at 11:31 PM.
Sincerely,
Jeff
Hello boylejob,
Yes. On your Sheet for variables, choose a cell,Say H12, which will populate the Label, and then use Code like the following sample:Is there a way to populate the text on the Label using one of the cells on the "Variables" tab?
If Sheets("Variables").Range("H12") <> "" Then Userform1.Label2.Caption=Sheets("Variables").Range("H12").Value Else: Userform1.Label2.Caption = " Whatever you want it to display" End If
Please consider:
Be polite. Thank those who have helped you. Click the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .
Winon,
Thank you very much. That worked perfectly. I had something similar coded, but obviously had something out of place because it was not working.
Sincerely,
Jeff
Hello boylejob,
You are welcome.
Please mark your thread as Solved.
Please consider:
Be polite. Thank those who have helped you. Click the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks