Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Pass value from form to form

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Pass value from form to form

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Pass value from form to form

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Pass value from form to form

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
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
pass to textbox on a form and to excel worksheet cvw New Users to Excel 0 March 16th 10 07:35 PM
form in excel to be attached to the emails address in the form upon sumission Abdulkader Bhanpurawala via OfficeKB.com Excel Programming 6 July 10th 05 10:48 AM
Pass variable from user form to macro r wilcox Excel Programming 1 May 23rd 05 07:27 PM
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? Daniel[_14_] Excel Programming 1 August 29th 04 01:20 PM
Pass parameter to a form and then open it? Darren Hill[_2_] Excel Programming 3 February 7th 04 06:21 PM


All times are GMT +1. The time now is 09:35 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"