Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default NEXT/PREVIOUS OPTIONBUTTON

Is there a way to create a routine that would beable to run the next or
previous OptionButton.

I have a UserForm that has five OptionButtons(1-5). When the user clicks on
one the given code is run. What I want to beable to do is go to the next or
previous OptionButton with a button rather than going back through the
process of opening the UserForm and choosing the next or preiouvs.

As always, any help is appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default NEXT/PREVIOUS OPTIONBUTTON

you'll want to look into doing a tab option group and customzing the
tabs to do your next-previous operations.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default NEXT/PREVIOUS OPTIONBUTTON

Assuming that all you have done is hidden the form and not unloaded it you
can retrieve the value of the option buttons. Obviously you are going to have
2 buttons for next and previous on your spreadsheet or wherever. You can read
the values of the option buttons something like (Next Button Code)

With UserForm1
If .OptionButton5.Value = True Then .OptionButton1.Value = True
If .OptionButton4.Value = True Then .OptionButton5.Value = True
If .OptionButton3.Value = True Then .OptionButton4.Value = True
If .OptionButton2.Value = True Then .OptionButton3.Value = True
If .OptionButton1.Value = True Then .OptionButton2.Value = True
End With

--
HTH...

Jim Thomlinson


"Ronbo" wrote:

Is there a way to create a routine that would beable to run the next or
previous OptionButton.

I have a UserForm that has five OptionButtons(1-5). When the user clicks on
one the given code is run. What I want to beable to do is go to the next or
previous OptionButton with a button rather than going back through the
process of opening the UserForm and choosing the next or preiouvs.

As always, any help is appreciated.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default NEXT/PREVIOUS OPTIONBUTTON

Thanks Jim, that is exactly what I am looking for. However, when I get to
OptionButtton5 and click next it jumps to Optionbutton2. It runs
OptionButton1 and then OptionButton2 where it stays. Any ideas as to why

"Jim Thomlinson" wrote:

Assuming that all you have done is hidden the form and not unloaded it you
can retrieve the value of the option buttons. Obviously you are going to have
2 buttons for next and previous on your spreadsheet or wherever. You can read
the values of the option buttons something like (Next Button Code)

With UserForm1
If .OptionButton5.Value = True Then .OptionButton1.Value = True
If .OptionButton4.Value = True Then .OptionButton5.Value = True
If .OptionButton3.Value = True Then .OptionButton4.Value = True
If .OptionButton2.Value = True Then .OptionButton3.Value = True
If .OptionButton1.Value = True Then .OptionButton2.Value = True
End With

--
HTH...

Jim Thomlinson


"Ronbo" wrote:

Is there a way to create a routine that would beable to run the next or
previous OptionButton.

I have a UserForm that has five OptionButtons(1-5). When the user clicks on
one the given code is run. What I want to beable to do is go to the next or
previous OptionButton with a button rather than going back through the
process of opening the UserForm and choosing the next or preiouvs.

As always, any help is appreciated.

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
3-Color Scale Vlookup for Current Month/Previous/Pre-Previous NeoFax Excel Discussion (Misc queries) 2 January 8th 10 07:04 PM
optionbutton ZX Excel Programming 1 June 9th 05 12:24 PM
optionbutton benb Excel Programming 1 March 29th 05 09:41 PM
OptionButton nrage21[_69_] Excel Programming 1 September 29th 04 02:14 AM
OptionButton nrage21[_70_] Excel Programming 0 September 29th 04 12:23 AM


All times are GMT +1. The time now is 02:36 AM.

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

About Us

"It's about Microsoft Excel"