vba code - help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'd like a line in a Private Sub to return a value found in a cell on the
spreadsheet.
Here's the line. F2 is where the data is. I have tried 'Sheet1!', braces and
so on, but I can't get it to accept the code.
UserForm1.TextBox9.Value = F2

Help!
 
Jock,

Try this:-

Private Sub UserForm_Initialize()
TextBox9.Value = Worksheets("Sheet1").Range("F2").Value
End Sub
 
Thanks Mike. Just the job
Can that code be adapted to update when the data on the user form is sent to
the spreadsheet so it constantly showing the correct monetary value (in this
case)?
 

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

Back
Top