Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do i pass a value from code written for an option button to code for a
command button? I am running an auto open macro that shows userform1 with 2 command buttons, one of which that shows userform3, which has 16 option buttons. I want to pass a string back after one of the 16 options is selected. I am using xl97 and windows NT. I should also mention that I have just begun to noodle around with forms, I've previously been able to get by with input and message boxes. TIA |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When the user is finished updating the option buttons then you just need to
hide the form. The form and all its values are still accessible, you just can't see the form. So in Form 2 you could write a line such as msgbox userform3.optionbutton1.value which will display the value of the option button on the hidden form. So you are not so much passing the values as you are just accessing the values. -- HTH... Jim Thomlinson "Harley" wrote: How do i pass a value from code written for an option button to code for a command button? I am running an auto open macro that shows userform1 with 2 command buttons, one of which that shows userform3, which has 16 option buttons. I want to pass a string back after one of the 16 options is selected. I am using xl97 and windows NT. I should also mention that I have just begun to noodle around with forms, I've previously been able to get by with input and message boxes. TIA |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I now understand, thank you. If I unload the form, rather than hide it, are
the values still available? "Jim Thomlinson" wrote: When the user is finished updating the option buttons then you just need to hide the form. The form and all its values are still accessible, you just can't see the form. So in Form 2 you could write a line such as msgbox userform3.optionbutton1.value which will display the value of the option button on the hidden form. So you are not so much passing the values as you are just accessing the values. -- HTH... Jim Thomlinson "Harley" wrote: How do i pass a value from code written for an option button to code for a command button? I am running an auto open macro that shows userform1 with 2 command buttons, one of which that shows userform3, which has 16 option buttons. I want to pass a string back after one of the 16 options is selected. I am using xl97 and windows NT. I should also mention that I have just begun to noodle around with forms, I've previously been able to get by with input and message boxes. TIA |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No, unload clears out memory. If you do this, you need to off-load the
values somewhere else. -- HTH RP (remove nothere from the email address if mailing direct) "Harley" wrote in message ... I now understand, thank you. If I unload the form, rather than hide it, are the values still available? "Jim Thomlinson" wrote: When the user is finished updating the option buttons then you just need to hide the form. The form and all its values are still accessible, you just can't see the form. So in Form 2 you could write a line such as msgbox userform3.optionbutton1.value which will display the value of the option button on the hidden form. So you are not so much passing the values as you are just accessing the values. -- HTH... Jim Thomlinson "Harley" wrote: How do i pass a value from code written for an option button to code for a command button? I am running an auto open macro that shows userform1 with 2 command buttons, one of which that shows userform3, which has 16 option buttons. I want to pass a string back after one of the 16 options is selected. I am using xl97 and windows NT. I should also mention that I have just begun to noodle around with forms, I've previously been able to get by with input and message boxes. TIA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
pass to textbox on a form and to excel worksheet | New Users to Excel | |||
form in excel to be attached to the emails address in the form upon sumission | Excel Programming | |||
Pass variable from user form to macro | Excel Programming | |||
Is it possible to open the VBA form with a link in a sheet and to pass variable from a cell to the VBA form? | Excel Programming | |||
Pass parameter to a form and then open it? | Excel Programming |