Solved

user form

Posted on 2012-03-14
4
193 Views
Last Modified: 2012-03-15
I have a user form with four option buttons

if the user presses Option 1, another userform appears. if they close the second user form then they are back to the original user form.

If they wanted to press Option 1 again, they cant, as it is already selected.

How can i set the properties so that once a button is pressed, it is not stuck on that option

Thanks
Seamus
0
Comment
Question by:Seamus2626
4 Comments
 
LVL 13

Accepted Solution

by:
lee555J5 earned 300 total points
Comment Utility
Why would you use option buttons for this? Could you switch to regular buttons?

An alternative would be to clear your option buttons once the second form opens, or you could create a manual reset so all the options are available again.

Lee
0
 
LVL 13

Assisted Solution

by:Shanan212
Shanan212 earned 100 total points
Comment Utility
Sub OptionClear()

    Dim ws As Worksheet
    Dim obj As OLEObject

    Set ws = Worksheets("yoursheetname")

    For Each obj In ws.OLEObjects
        If TypeName(obj.Object) = "OptionButton" Then      
           'if this is checkbox, then change the letters withing quotes to CheckBox
            obj.Object.Value = False
        End If
    Next obj
End Sub

Open in new window


call the above sub after calling second userform
0
 
LVL 33

Assisted Solution

by:Norie
Norie earned 100 total points
Comment Utility
Seamus

Why not use a combobox and command button combination?

The combobox lists the options and the command button opens the relevant userform.
UF4FormComboMenu.xlsm
0
 

Author Closing Comment

by:Seamus2626
Comment Utility
Hey guys, it was easiest to switch to regular command buttons,

Thanks
Seamus
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now