Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

user form

Posted on 2012-03-14
4
Medium Priority
?
236 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 1200 total points
ID: 37720395
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 400 total points
ID: 37720594
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 35

Assisted Solution

by:Norie
Norie earned 400 total points
ID: 37721155
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
ID: 37724436
Hey guys, it was easiest to switch to regular command buttons,

Thanks
Seamus
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes a serious pitfall that can happen when deleting shapes using VBA.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

772 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