Log in

View Full Version : [SLEEPER:] How do I make multiple labels equal to one text box



James_H
05-27-2020, 06:29 AM
Hi Everyone,

I am a huge newbie to coding so I hope you can help me.

In power point 2010 I want to be able to have the words entered into a text box appear on multiple labels I have throughout my presentation.

I have been able to do this with one label using this line of code...


Private Sub TextBox1_Change()
Label1.Caption = TextBox1.Text
End Sub

...but cannot work out how to have multiple labels equal the text box. I have tried multiple ways including this below but I can't seem to get my head around it.


Private Sub TextBox1_Change()
Label1.Caption , Label2.Caption = TextBox1.Text
End Sub

As I said I am incredibly new to all of this so it's probably a very easy fix. I hope you can help.

Thank you.

Paul_Hossler
05-27-2020, 07:22 AM
Off hand, I'd say something like this



Private Sub TextBox1_Change()
Label1.Caption = TextBox1.Text
Label2.Caption = TextBox1.Text
End Sub