ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   control the controls with a control (https://www.excelbanter.com/excel-programming/411534-control-controls-control.html)

TUNGANA KURMA RAJU

control the controls with a control
 
just for curiosity,can it be posiible to add control with the help of a
control,
I have 2 option buttons ,By clicking Optionbutton1=add text box1 to the
userform.
optionButton2_click=Delete/unload textbox1.

Jim Thomlinson

control the controls with a control
 
It's easier to just hide or unhide an existing control by toggling the
visible property of the textbox.
--
HTH...

Jim Thomlinson


"TUNGANA KURMA RAJU" wrote:

just for curiosity,can it be posiible to add control with the help of a
control,
I have 2 option buttons ,By clicking Optionbutton1=add text box1 to the
userform.
optionButton2_click=Delete/unload textbox1.


TUNGANA KURMA RAJU

control the controls with a control
 
How it is incase of my question example?
What line of code has to be added to userform,if i select optionbutton 1,3
text boxes(textbox1,2,3) are to be activated and others are to be(say my
userform has 7 textboxes)disabled/hide/inactive.

"Jim Thomlinson" wrote:

It's easier to just hide or unhide an existing control by toggling the
visible property of the textbox.
--
HTH...

Jim Thomlinson


"TUNGANA KURMA RAJU" wrote:

just for curiosity,can it be posiible to add control with the help of a
control,
I have 2 option buttons ,By clicking Optionbutton1=add text box1 to the
userform.
optionButton2_click=Delete/unload textbox1.


Norman Jones[_2_]

control the controls with a control
 
Hi Tungana,

Why open a new thread with less information?

See response in your original thread:

change the appearnce of a userform
http://tinyurl.com/57zu2q



---
Regards.
Norman


"TUNGANA KURMA RAJU" wrote in
message ...
just for curiosity,can it be posiible to add control with the help of a
control,
I have 2 option buttons ,By clicking Optionbutton1=add text box1 to the
userform.
optionButton2_click=Delete/unload textbox1.



Jim Thomlinson

control the controls with a control
 
Textbox1.Visible = false or true as the case may be. Try this as an example

Add a user form to yoru project
Add 2 option buttons and 2 text boxes to the user form.
Add the following code.

Private Sub OptionButton1_Click()
TextBox1.Visible = False
TextBox2.Visible = True
End Sub

Private Sub OptionButton2_Click()
TextBox1.Visible = True
TextBox2.Visible = False

End Sub

Run the code and toggle the option buttons on the form.
--
HTH...

Jim Thomlinson


"TUNGANA KURMA RAJU" wrote:

How it is incase of my question example?
What line of code has to be added to userform,if i select optionbutton 1,3
text boxes(textbox1,2,3) are to be activated and others are to be(say my
userform has 7 textboxes)disabled/hide/inactive.

"Jim Thomlinson" wrote:

It's easier to just hide or unhide an existing control by toggling the
visible property of the textbox.
--
HTH...

Jim Thomlinson


"TUNGANA KURMA RAJU" wrote:

just for curiosity,can it be posiible to add control with the help of a
control,
I have 2 option buttons ,By clicking Optionbutton1=add text box1 to the
userform.
optionButton2_click=Delete/unload textbox1.



All times are GMT +1. The time now is 01:07 PM.

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