Populated a text box in a form Excel

Folks,
The attached workbook has many worksheets. "Menu" is the default worksheet when the workbook opens. I have a command button "Instructions" that calls a form "frmInstructions". This form has a text box, "txtInstructions". How do I populate the text box in such a way that if I change the instructions the new instructions will be displayed?
If text box is the wrong tool what would be a better tool to use?
Function-and-Formulas-for-Excel.xlsm
Frank FreeseAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rory ArchibaldCommented:
You can put the address of a cell into the ControlSource property of the textbox or you can use simple code in the Userform_Initialize event, like:

Private Sub Userform_initialize()
me.textbox1.text = sheets("some sheet").Range("A1").value
end sub

Open in new window

0
Frank FreeseAuthor Commented:
Not exactly - I'm getrting a error - out of range when I click of the command button :Instructions" which executes the following:
The error is coming when I execute:
Me.txtInstructions.Text = Sheets("Instructions").Range("A1:D1").Value
Can you have  a range beside a single cell?
0
gowflowCommented:
what is the data that you need to populate in txtInstructions ? you did not specify
gowflow
0
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

Frank FreeseAuthor Commented:
text data
gowflow?
0
Rory ArchibaldCommented:
There is no Instructions sheet in your example but, assuming you create one, you could use:
Private Sub UserForm_Initialize()
   With Me.txtInstructions
      .MultiLine = True
      .Text = Join(Evaluate("transpose(Transpose(Instructions!A1:D1))"), vbCrLf)
   End With
End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gowflowCommented:
well you didn ot understand my request. I know it is data but from what sheet and what cell.

for sure you will get an error at your instruction
Me.txtInstructions.Text = Sheets("Instructions").Range("A1:D1").Value

as I do not see a sheet called 'Instructions'
gowflow
0
Frank FreeseAuthor Commented:
Perfect
Thank you very much
0
Frank FreeseAuthor Commented:
Great answer and thanks for the help
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.