Text box in a userform to equal a cell

S

s_smith_iet

I need a userform text box to equal B5 on sheet Cycle data in the same
spread sheet.

Cannot figure this out

Please help
 
O

Office_Novice

Private Sub UserForm_Initialize()
Me.TextBox1.Value = Range("B5").Value
End Sub
 
R

Rick Rothstein \(MVP - VB\)

You forgot the worksheet (which I think is named "Cycle data")...

Private Sub UserForm_Initialize()
Me.TextBox1.Value = Worksheets("Cycle data").Range("B5").Value
End Sub

Rick
 

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