PC Review


Reply
Thread Tools Rate Thread

control the controls with a control

 
 
TUNGANA KURMA RAJU
Guest
Posts: n/a
 
      26th May 2008
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.
 
Reply With Quote
 
 
 
 
Jim Thomlinson
Guest
Posts: n/a
 
      26th May 2008
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.

 
Reply With Quote
 
TUNGANA KURMA RAJU
Guest
Posts: n/a
 
      26th May 2008
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.

 
Reply With Quote
 
Norman Jones
Guest
Posts: n/a
 
      26th May 2008
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" <(E-Mail Removed)> wrote in
message news:8878C8CD-6C06-448B-AF1B-(E-Mail Removed)...
> 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.


 
Reply With Quote
 
Jim Thomlinson
Guest
Posts: n/a
 
      26th May 2008
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
this.Controls.Add(Control) Does Not Add Control to child collection (this.Controls.Count == 0) Chad Scharf Microsoft ASP .NET 3 18th Oct 2007 04:53 PM
using controls in user control as control parameters on parent page HP Microsoft ASP .NET 3 19th Dec 2006 10:14 PM
Dropping controls in a User Control ges added to parent control Joe Microsoft C# .NET 2 28th Mar 2006 01:00 AM
Dynamic Controls in User Control; page/control lifecycle question Frankie Microsoft ASP .NET 2 23rd Jun 2005 05:07 PM
controls getting values from another control---within a control DC Gringo Microsoft ASP .NET 0 15th Sep 2004 05:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:31 AM.