Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

control the controls with a control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TUNGANA KURMA RAJU - 26 May 2008 20:31 GMT
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 - 26 May 2008 20:36 GMT
It's easier to just hide or unhide an existing control by toggling the
visible property of the textbox.
Signature

HTH...

Jim Thomlinson

> 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 - 26 May 2008 21:26 GMT
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.

> It's easier to just hide or unhide an existing control by toggling the
> visible property of the textbox.
[quoted text clipped - 4 lines]
> > userform.
> > optionButton2_click=Delete/unload textbox1.
Jim Thomlinson - 26 May 2008 21:53 GMT
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.
Signature

HTH...

Jim Thomlinson

> How it is incase of my question example?
> What line of code has to be added to userform,if i select optionbutton 1,3
[quoted text clipped - 9 lines]
> > > userform.
> > > optionButton2_click=Delete/unload textbox1.
Norman Jones - 26 May 2008 21:47 GMT
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

> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.