Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform inputs
Hi
Sorry I don't know how to do this. This is the code I am using to find out which option is selected. 'Private Sub CommandButton1_Click() 'For Each x In Frame2.Controls 'If x.Value = True Then 'MsgBox x.Caption 'End If 'Next 'Me.Hide 'End Sub I then cannot dim and set the value (even if I use dim as msforms.optionbutton) Subject: userform inputs From: "Ed" Sent: 9/19/2003 2:50:11 PM Jo, The option box's Value property is: -1 True. Indicates the item is selected. 0 False. Indicates the item is cleared. You can set up a variable to hold the value and the use the variable else where. -----Original Message----- Hi How do I retain information form a userform option box to use in later modules. eg. from a list a fruit I could tell apples had been selected by a user (using a for next grop within the frame controls) how do I then (i) call fruit selected in a regular macro (ii) fill in another userform with the selection. I think I somehow need to declare user fruit choice, but I am not sure how. Any help much appreciated Jo |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
userform inputs
Jo,
You would need a second routine to test it, right? Add a second command button and try something like: Private Sub CommandButton1_Click() Dim userSelected as String For Each x In Frame2.Controls If x.Value = True Then userSelected = x.Caption End If Next Me.Hide End Sub Private Sub CommandButton2_Click() MsgBox userSelected End Sub -----Original Message----- Hi Sorry I don't know how to do this. This is the code I am using to find out which option is selected. 'Private Sub CommandButton1_Click() 'For Each x In Frame2.Controls 'If x.Value = True Then 'MsgBox x.Caption 'End If 'Next 'Me.Hide 'End Sub I then cannot dim and set the value (even if I use dim as msforms.optionbutton) Subject: userform inputs From: "Ed" Sent: 9/19/2003 2:50:11 PM Jo, The option box's Value property is: -1 True. Indicates the item is selected. 0 False. Indicates the item is cleared. You can set up a variable to hold the value and the use the variable else where. -----Original Message----- Hi How do I retain information form a userform option box to use in later modules. eg. from a list a fruit I could tell apples had been selected by a user (using a for next grop within the frame controls) how do I then (i) call fruit selected in a regular macro (ii) fill in another userform with the selection. I think I somehow need to declare user fruit choice, but I am not sure how. Any help much appreciated Jo . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Quarterly inputs | Excel Worksheet Functions | |||
custom inputs | Excel Discussion (Misc queries) | |||
A question of two inputs | Excel Worksheet Functions | |||
All number inputs are divided by 100 ? | Setting up and Configuration of Excel | |||
userform inputs | Excel Programming |