Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Geeske Bakker   on Feb 11 In MS Office Category.

  
Question Answered By: Jacob Evans   on Feb 11

Your option 2 seems to work. I tried putting the code below in the
userform and it worked. It takes cell B5 of the active sheet and
places it in the text box.

Private Sub UserForm_Initialize()
TextBox1.Text = Cells(1, 2)
End Sub

Other things...
If the sheet is not active use:
TextBox1.Text = Worksheets("Sheet1").Cells(1, 2)
If you want to see the cell's formula (e.g. =1+1) use:
TextBox1.Text = Worksheets("Sheet1").Cells(1, 2).Formula

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Userforms Or get search suggestion and latest updates.


Tagged: