UserForm-Insert value from diff worksheet into text box upon initi

G

Guest

How do you code UserForm_Initilize() to copy the value in a specific cell in
a different worksheet (within the same workbook but not on the same worksheet
that the UserForm is on) into the textbox on the UserForm?

Thanks in advance.
 
S

Susan

in the initialize coding, put

me.txtboxname.value=worksheets("name").range("area").value

fix the appropriate names with your own.
susan
 
G

Guest

Thanks Susan. This sort of worked. When I click on the command button to
open the form it does not populate the text box; but if I click on the Clear
command button (which calls UserForm_Initialize) then the text box is
populated.
 
G

Guest

Disregard. I got it to work. Thanks again.

dread said:
Thanks Susan. This sort of worked. When I click on the command button to
open the form it does not populate the text box; but if I click on the Clear
command button (which calls UserForm_Initialize) then the text box is
populated.
 

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