Auto Populate on Open with the Users Name

L

Lime

Hello,
I Have a Word form. Combo box12 I would like to auto populate with the users
name when the file open
Any help??

Lime
 
L

lumpy04

Private Sub Document_Open()

'Populate the drop down lists'

DeviceTypes.List = Array(" ", "Desktop", "Laptop", "Printer", "Other")

End Sub

The Document _open is the place to list all the events you want to happen
when the document is opened. Not trying for sarcasm here..
You can past this code into your form, substitute "DeviceTypes.List" with
ComboBox12.List, and replace items like "Desktop" with your user's names.
:
 
L

Lime

I'm Sorry I meant Text Box. When the file is opened I would like the text box
to auto populate with the Users name (the person filling out the form)
 
L

lumpy04

ok, you might try the following:

Private Sub Document_Open()
textbox1.text = "%username%"
end sub
 
L

Lime

Hello,
Thanks for your input but all that will do is put %Username% in textbox1

Thanks,
Lime
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top