Solved

user form

Posted on 2012-03-14
4
214 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
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 100 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 33

Assisted Solution

by:Norie
Norie earned 100 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
create excel pivot chart 12 44
Excel Spacing Anomaly 4 24
Merging spreadsheets 8 44
Excel - DATEDIF error #NUM 6 26
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
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…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

831 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