Help required

S

seamus.feeney

Someone may be able to help me with this problem. I have set up a
worksheet with a userform that allows my staff to fill out a
questionnaire. Each staff member will be getting a copy of the
worksheet so there is only one set of answers per worksheet.

My problems is that the questionnaire is quite large and I want the
staff to be able to fill some of it out and then save it and then come
back to it if they so choose.

So what i really want is to be able to open the said userform and any
information all ready entered in the corresponding worksheet to be
loaded back in.

For example i'd like textbox3 to have the information (if any) that is
in cell C3 on sheet 2
Then I'd like textbox4 to have the info from C4 on sheet 2 etc etc..

Anyone know if this is possible?
 
K

Keith74

You can put some code in the "Open" or "Initialise" event of the
userform (I forget which is best) to update the textbox with the
contents of whichever cell. The code you want is something like:

myTextBox.value = Sheets("sheet1").Cells(<rownumber>,
<coulmunnumber>).Value

hth

Keith
 
S

seamus.feeney

You can put some code in the "Open" or "Initialise" event of the
userform (I forget which is best) to update the textbox with the
contents of whichever cell. The code you want is something like:

myTextBox.value = Sheets("sheet1").Cells(<rownumber>,
<coulmunnumber>).Value

hth

Keith

Hey Keith,

I tried this but it does not seem to be working. Any Ideas?

Regards
 
K

Keith74

Hi

I've just tested this with something in cells a1 and a2 on sheet1

Private Sub UserForm_Initialize()

TextBox1.Value = Sheets("sheet1").Cells(1, 1).Value
TextBox2.Value = Sheets("sheet1").Cells(2, 1).Value

End Sub

seems to work

Whats the problem you are having?
 
S

seamus.feeney

Hi

I've just tested this with something in cells a1 and a2 on sheet1

Private Sub UserForm_Initialize()

TextBox1.Value = Sheets("sheet1").Cells(1, 1).Value
TextBox2.Value = Sheets("sheet1").Cells(2, 1).Value

End Sub

seems to work

Whats the problem you are having?

Hey Keith,

I actually found something on aother page that worked. It similar to
what you have here.

Me.TextBox9.Value = Worksheets("sheet2").Range("C3").Value

This worked perfectly..

Just wanted to thank you for helping.

Seamus.
 

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