Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default listbox option in form

I have a form in excel vb which has a listbox with alternatives option1 and
option2.
Option1 is the default. If option2 is selected I would like to put up a
additional textbox and label on the same form asking for further
information via the textbox. (This textbox and label should not appear when
the form is first opened.)

Is it possible to do this? If so how?

TIA
Chris



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default listbox option in form

Place the text box on the form and set its visible property to false.
In the option button's change event set the text box visible property to the
value of the option

Private Sub OptionButton2_Change()
TextBox1.Visible = OptionButton2.Value
Label1.Visible= OptionButton2.Value
End Sub
--
Patrick Molloy
Microsoft Excel MVP

"inquirer" wrote in message
...
I have a form in excel vb which has a listbox with alternatives option1

and
option2.
Option1 is the default. If option2 is selected I would like to put up a
additional textbox and label on the same form asking for further
information via the textbox. (This textbox and label should not appear

when
the form is first opened.)

Is it possible to do this? If so how?

TIA
Chris





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default listbox option in form

Thanks Patrick, that's what I needed
Chris

"Patrick Molloy" wrote in message
...
Place the text box on the form and set its visible property to false.
In the option button's change event set the text box visible property to

the
value of the option

Private Sub OptionButton2_Change()
TextBox1.Visible = OptionButton2.Value
Label1.Visible= OptionButton2.Value
End Sub
--
Patrick Molloy
Microsoft Excel MVP

"inquirer" wrote in message
...
I have a form in excel vb which has a listbox with alternatives option1

and
option2.
Option1 is the default. If option2 is selected I would like to put up a
additional textbox and label on the same form asking for further
information via the textbox. (This textbox and label should not appear

when
the form is first opened.)

Is it possible to do this? If so how?

TIA
Chris







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to filter listbox data in a form? Vinod Excel Discussion (Misc queries) 1 January 11th 10 02:01 PM
listbox in excel that is an option for sql query Laoballer Excel Discussion (Misc queries) 0 September 24th 08 12:15 AM
Multi-field listbox in an Excel form Lee S. Excel Discussion (Misc queries) 0 September 14th 06 10:19 PM
User form with a listbox John Green[_2_] Excel Programming 4 December 30th 03 07:18 PM
Listbox/Form question Stuart[_5_] Excel Programming 1 August 24th 03 04:53 PM


All times are GMT +1. The time now is 03:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"