ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help required (https://www.excelbanter.com/excel-programming/394378-help-required.html)

[email protected]

Help required
 
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?


Keith74

Help required
 
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



[email protected]

Help required
 
On Jul 30, 10:10 am, Keith74 wrote:
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


Keith74

Help required
 
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?



[email protected]

Help required
 
On Jul 30, 12:07 pm, Keith74 wrote:
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.



All times are GMT +1. The time now is 10:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com