Auto update Form Text box with form editor name

Seacowdaz

New Member
Joined
Mar 20, 2018
Messages
11
Hello,
I’m not sure if what I want to do is possible but I have a user form (screenshot attached) what I would like to know is if there is a way to automatically update the ‘Agent’ field with the name of the person updating the form?

attachment.php
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Cross posted http://www.vbaexpress.com/forum/showthread.php?62667-Auto-update-Form-Text-box-with-form-editor-name

Cross-Posting
While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0
Something along the lines of
Code:
Private Sub UserForm_Initialize()
Me.Label1.Caption = Environ("username")
End Sub
 
Upvote 0
Hello thank you for your reply, first of all i'm sorry for cross posting, i didn't realise it was the same forum.

secondly, with the above sub do i add this as a sub for the text box i am using?
 
Upvote 0
Hello thank you for your reply, first of all i'm sorry for cross posting, i didn't realise it was the same forum.

secondly, with the above sub do i add this as a sub for the text box i am using?[/

I've figure out how to use the Sub. and i relaly appreciate the help. at the moment it shows the username but is there anyway of changing this so that if the username is SmithJ1 for example then John Smith Shows in the field instead?
 
Upvote 0
How do we know the name of the person?
 
Upvote 0
the only way i would know would be by knowing the person. if thats what you mean, sorry for not being clear
 
Upvote 0
If the username is SmithJ, but you want to display John Smith.
How would the macro know that SmithJ is John Smith as opposed to Jane Smith?
Do you have a list of usernames/full names?
 
Upvote 0

Forum statistics

Threads
1,223,708
Messages
6,174,006
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top