ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Locking a TextBox in a userform (https://www.excelbanter.com/excel-programming/387985-locking-textbox-userform.html)

CSUS_CE_Student[_2_]

Locking a TextBox in a userform
 
I want to lock a text box in a UserForm i made. This Box is returning data
and i dont want the user to be able to change the values. I could not find
an option taht looked like it would Disallow user input into the box. Is
there such and option? Or maybe another way to do this using a different
type of tool?

Vergel Adriano

Locking a TextBox in a userform
 
Hi,

You could set the Locked property to True in the Properties box.

Or do it programmatically:

TextBox1.Locked = True



--
Hope that helps.

Vergel Adriano


"CSUS_CE_Student" wrote:

I want to lock a text box in a UserForm i made. This Box is returning data
and i dont want the user to be able to change the values. I could not find
an option taht looked like it would Disallow user input into the box. Is
there such and option? Or maybe another way to do this using a different
type of tool?


CSUS_CE_Student[_2_]

Locking a TextBox in a userform
 
Thanks!
I cant believe i didnt see that option, but that was exactly what i was
looking for. Thanks again

CSUS_CE_Student

"Vergel Adriano" wrote:

Hi,

You could set the Locked property to True in the Properties box.

Or do it programmatically:

TextBox1.Locked = True



--
Hope that helps.

Vergel Adriano


"CSUS_CE_Student" wrote:

I want to lock a text box in a UserForm i made. This Box is returning data
and i dont want the user to be able to change the values. I could not find
an option taht looked like it would Disallow user input into the box. Is
there such and option? Or maybe another way to do this using a different
type of tool?


Dave Peterson

Locking a TextBox in a userform
 
Wouldn't it be more common to use a Label?

CSUS_CE_Student wrote:

I want to lock a text box in a UserForm i made. This Box is returning data
and i dont want the user to be able to change the values. I could not find
an option taht looked like it would Disallow user input into the box. Is
there such and option? Or maybe another way to do this using a different
type of tool?


--

Dave Peterson


All times are GMT +1. The time now is 05:44 PM.

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