Worksheet value to user forms

D

David

Hi

I am trying to get a value in one of my worksheets to
display in a created userform. Basically I have created a
working spreadsheet that includes very longwinded and
tedious equations (all of which give the correct
solutions). Rather than rewriting the whole thing into
visual basic (or similar)I thought I would cheat and
simply produce some userforms that place data in cells and
collect from other cells. Thus there is no need to
recreate the equations

strspeed = TextBox2.Value
Range("'(1) Design characteristics'!B6").Value =
strspeed

I have managed to send data to the sheet from the user
form using the above code (when a command button is
pressed) but have been unable to get values from the
worksheets to the userform - can anybody help?? I have
been trying to get the text back into a textbox.

I am using office (excel) 2000 - Cheers
 
M

Media Lint

Puts the contents of cell A1 in sheet1 in textbox1 on the
user form:

Private Sub CommandButton1_Click()
Me.TextBox1 = ThisWorkbook.Worksheets("Sheet1").Cells(1, 1)
End Sub
 
D

David

Cheers Works a treat

-----Original Message-----
Puts the contents of cell A1 in sheet1 in textbox1 on the
user form:

Private Sub CommandButton1_Click()
Me.TextBox1 = ThisWorkbook.Worksheets("Sheet1").Cells(1, 1)
End Sub

.
 

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