Log in

View Full Version : Make all TextBox in slide Have a Same Action Without Rewrite It in Each Textbox



yrald47
04-30-2018, 08:08 AM
Hi, i want to make some quiz with powerpoint. I'll use so many TextBox that can filled in when powerpoint show (F5/Shift+F5). In TextBox1 i set the code


Private Sub TextBox1_Change()
TextBox1.MaxLength = 1
TextBox1.Text = UCase(TextBox1.Text)
End Sub


and that code will be rewrite for every TextBox#_Change, that so ineffective, right ? So, how to make all textbox, each textbox have the same code :
TextBox1.MaxLength = 1 TextBox1.Text = UCase(TextBox1.Text) without write it repeatedly. I jut need to write it once time, and all textbox in the slide will have this function below :
TextBox1.MaxLength = 1 TextBox1.Text = UCase(TextBox1.Text)

thanks

yrald47
05-04-2018, 02:55 AM
I'll make it more clearly,

I want to make the textbox can fill with just one letter (uppercase), and when we done fill it, it will move to other textbox (SetFocus; but i cant find how to doing this)

And,,,to doing that, i dont' want to make the code write over and over again, the code just run once at slide show start