ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Make Userform Caption equal textbox contents (https://www.excelbanter.com/excel-programming/436916-make-userform-caption-equal-textbox-contents.html)

Roger on Excel

Make Userform Caption equal textbox contents
 
How does one make a Userform title bar caption Equal the contents of Textbox1?

Can anyone help?

Thanks,

Roger

Jacob Skaria

Make Userform Caption equal textbox contents
 
You can try

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

or you can use Textbox1_Exit event...

--
Jacob


"Roger on Excel" wrote:

How does one make a Userform title bar caption Equal the contents of Textbox1?

Can anyone help?

Thanks,

Roger


Roger on Excel

Make Userform Caption equal textbox contents
 
Thanks Jacob - works nicely

Roger

"Jacob Skaria" wrote:

You can try

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

or you can use Textbox1_Exit event...

--
Jacob


"Roger on Excel" wrote:

How does one make a Userform title bar caption Equal the contents of Textbox1?

Can anyone help?

Thanks,

Roger



All times are GMT +1. The time now is 12:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com