Recognize Which Radio Button The User Selected?

Jul 21, 2014

Within a worksheet, I have several radio buttons, allowing the user to select only one of them. Using VBA, how do I recognize which radio button the user selected?

View 1 Replies


ADVERTISEMENT

Ensure User Selects Radio Button Before Adding Information

May 27, 2014

I have a userform for inputting information to a spreadsheet using the code below. It works fine however if the user does not select a radio button to select a score its saving the rest without it. How can I ensure the user selects a score,,,, ob10, ob8, ob6, ob4, ob2, obna.

[Code] ......

View 2 Replies View Related

Excel 2007 :: VBA To Make Command Button Inactive Until User Field Selected

Nov 14, 2011

I am creating a userform in Excel 2007 which requires a user to pick their name from a drop down box then press Ok, what i want to do is disable the Ok button until the user field has been selected.

View 1 Replies View Related

Radio Button Alert

Nov 25, 2008

I have a chart that's being updated with different values when I cklick on different radiobuttons. When the cells that the radio button refers to is empty or the calculation in the cell have an error it pops up a message that I need to click OK to go on. Is there a way to stop these alerts by writing a script that shuts the alert messages off during each click?

View 2 Replies View Related

Should I Use A Radio Button Or Checkbox

Feb 22, 2008

I'm making a worksheet where the user has the options to select "yes" or "no". I used active x radio buttons because I feel they are more flexible. The problem I'm running in to is, what happens if there is an "unknown"? I can't find a way to "deselect" a radio button?

I tried using 2 checkboxes using the following
Checkbox 1:

If CheckBox2.Value = True Then
CheckBox1.Value = False
End If

Checkbox2:

If CheckBox1.Value = True Then
CheckBox2.Value = False
End If

The problem with this is, you have to deselect one checkbox before you can select the other. It works, but it’s a little more cumbersome then I was hoping. Is there a better solution?

View 9 Replies View Related

Excel VBA To Select IE Radio Button

Feb 18, 2014

When I select the binoculers by project the window we are disucssing with the radio button comes up (after the project number is added and sendkey to select filter - only shows one radio button). Attached is the source code of the original window and a snapshot of what it looks like.

First window - I currently have the code going to the project area (where we cannot type anything) then using sendkey to tab and enter to select the binoculers.

New window - only one radio button shows after you type a project number than hit filter.

First Window.xlsm
Original Window source code.txt
new window.xlsx
New window radio source code.txt

View 4 Replies View Related

Radio Button: Just Click To Select The Value

Nov 17, 2008

I am looking at designing a simple radio button system which allows me to fill an adjacent cell with values from a certain column - so in the example, column C is the total value, and columns D-F will ideally have a radio button which a user can just click to select the value.

View 4 Replies View Related

Radio Button Default Selection

Oct 11, 2009

I have a Userform (frmData) with 4 CommandButtons (Cmd1, Cmd2 etc) and also 2 RadioButtons (Opt1 & Opt2).

I want Opt1 to be the default selection when frmData is opened.
If Opt1 or Opt2 is selected I want that option to stay selected until frmData is closed.

When Cmd1 is selected code1 runs if Opt1 is ticked, and Code2 if Opt2 is selected.

View 6 Replies View Related

Naming Radio Button In Macros?

Mar 16, 2012

I have code in my macro that outputs a radio button for every project that is entered into the database. All radio buttons are part of the same group. I know how to give the radio button an caption name but I do not know how to give the radiobutton an actual name that I can call to. How can I do this in excel macros?

View 9 Replies View Related

Create New Radio Button Group

Sep 13, 2012

I am using the developer tools and have created a set of radio buttons that work fine.

On the same worksheet and tab I have created a second set of radio buttons but all the radio buttons are grouped as the same set.

How do I define the second group as a second group?

View 2 Replies View Related

VBA Code For Go To Next Sheet Using Radio Button

Feb 17, 2014

VBA code for go to next sheet using radio button.

View 1 Replies View Related

To Ensure All Radio Button Groups Are Used Before Moving On.

Jan 7, 2010

I have created a survey in excel 2003. It has 70 questions on it and the user responds to the questions by clicking on a radio button. There are 4 radio buttons within a group box for each question and the user will select one of them.

At the end of 'sheet 1' with all these questions on, i have a button which the user presses to proceed to 'sheet 2'. When they press the button i want to ensure is that all questions have been answered ie: 1 of the radio buttons is selected for every question.

If one of the questions isnt answered then a pop up box will appear to tell the user they have unanswered questions and then the vba code will exit and the user stays on the question sheet (sheet 1). If all the questions are answered then the user will move to 'sheet 2'. (the reference cells for all the groups of radio buttons are within column G on sheet 1).

View 3 Replies View Related

Combobox And Radio Button Reducing In Size

Sep 17, 2012

I have an issue with a combo box and radio button.

Anytime I click on either of them, they reduce in size.

It's as if it is reducing by the same ratio every time until you can't click on it anymore.

View 3 Replies View Related

Linking Drop Down List To Radio Button

Jul 31, 2008

I am building a form and want to display (or activate) a drop down list only when an radio button is active. I have 4 radio buttons and want to link to to 4 different drop downs. But only have the drop downs active if the button is clicked.

View 9 Replies View Related

Radio Button Transparency Lost When Clicked, How To Remedy

Jan 23, 2009

I have a form (worksheet with controls embedded in) and the form changes color depending on what the user clicked, problem is that button colors and cell pattern colors don't quite match.

thought I solved it by making the buttons backstyle = transparent.
However, as soon as radio button was clicked, transparency was lost.

I have named the range of the form "FormGround" so that when Service 1 is select, the Form turn a different colour. I have my subsequent buttons change to that same color as well (using the cell's color index number.

View 4 Replies View Related

How To Disable Combobox On Radio Button Click In Macros

May 19, 2009

how to disable combobox on radio button click in excel macros'

I have 2 radio buttons: optionbutton1 and optionbutton2 and two comboboxes: Combobox1 and Combobox2.If i select 1st radio button 2nd combobox should be disabled.Vise versa

View 9 Replies View Related

Radio Buttons To Behave Similar To The Forms Version Of The Button

Dec 17, 2009

I'm trying to create a form using radio buttons from the "Forms Tool Bar" and not sure I shouldn't be using the "Control Tool Bar"

I've got multiple buttons and wanted to group them so i used the "Group Box" from the Forms tool bar but now there's a box around the buttons (I've turned off Printing for the box) that gets in the way of other text on sheet. I did some searching and thought I read where you could also use the drawing tool bar and draw a rectangle around the buttons which would then let them operate independent of other groups of buttons but that doesn't seem to work so I'm guessing I imagined it. I also noticed that if you don't draw the "Group Box" around the hole radio button box, they don't work with others in the same "Group Box"

I'm not sure if I should use the buttons in the "Control Tool Bar" but I'm thinking I should so that I have the flexibility should I decide to do something different in the future. I'm thinking about using the buttons to hide a sheet as well as select the sheet for printing, but for now one hurdle at a time.

Lastly I tried looking up some information on how to get the "Control Tool Bar" radio button to behave similar to the "Forms" version of the button (i.e. click the button and it appears to alternate from other buttons in the group), however when I place my mouse over the button it selects it rather than letting me change it's state from true to false.

View 8 Replies View Related

Excel 2003 :: VBA Radio Button Reverts To Default State

Mar 13, 2014

I have an excel file containing 50 sheets which we use as an accreditation test. Each sheet contains one question to which there are several possible answers. These answers (for example, A, B, C and D) are option buttons and when a user selects one, that selection is recorded as their response which is then marked. After answering a question they click a NEXT button to move on and as they move on the previous sheet (question) is hidden so they only ever see the current question sheet.

This has worked well for us for a few years, but we have just noticed some odd behaviour on ONE SPECIFIC sheet. The option button the user selects on that sheet (it is actually question 13 in the sequence) is not stored after the test is completed. However on every other sheet, the selection is stored fine - just this one sheet. The properties of all objects on the rouge sheet are the same as the other sheets. I have duplicated a working sheet and tried replacing the question 13 sheet to try that, but the problem persists.

I tried deleting that Q13 sheet and running the test without it and the same problem occured but this time on the preceeding sheet (question 12) which suggests it is not the actual sheet that is causing the problem.

This is the vb code we have on each sheet

Option ExplicitDim Response As StringDim q13 As IntegerPrivate Sub cmdQ13_Click()    q13 = 0
If optq13a.Value = False And optq13b.Value = False And optq13c.Value = False And optq13d.Value = False Then
Response = MsgBox("You must answer Question 13 by selecting one of the options!", 16, "More Information Needed !")        
[Code] .....

So in this example there are 4 option buttons and 1 command button. It is no different to the other 49 sheets

View 2 Replies View Related

VBA Recognize Windows User Accounts And Allow Edit Access

Jul 22, 2009

I'm working on protecting a spreadsheet to where only certain people would be allowed to unprotect and edit it... I've used a standard password protection and created a userform prompting for password and unlocking the sheet, and this works fine.

On the other hand, I was interested if it's possible to write the code to where once the "unprotect" button is clicked it would seek User Account name from windows and try to match it with a list of users somewhere within the workbook. This way the user wouldn't be prompted for a password, but rather the unlocking would simply work or not depending on user account.

View 9 Replies View Related

Userform Listbox That Lists Data Based On Radio Button Selections

Mar 14, 2009

I have a worksheet (attached) that lists various clients in columan C. Column E lists whether each of the clients listed in Column C are 'Existing Business' or 'New Business'. I require a user form that has three radio buttons (one to select 'New Business', another for 'Existing Business' & one for 'All').

When Selecting a radio button, (e.g. 'Existing Business'), I need all clients listed in Column C of the worksheet that also have 'Existing Business' in Column E to be listed in a ListBox on the UserForm (with the second radio button allowing the text box to list 'New Business' and the third to list both Existing and New).

View 3 Replies View Related

Userform One Combobox Three Data Columns Select Required Column Based On Radio Button

Jun 10, 2013

I have a user form that has one combo box on it that right now references one column of data.

Now I am being asked to have three columns of data and the combo box to show one of the three when a certain criteria is met.

I believe it would be easiest to have an additional combox with a change event when the box is populated with "whatever" in the field

So S:3 to S:5 have A, B, C

And EC:1-EC:59, ED:1-ED:59, EE:1-EE:59 contain the data that should show when S:3, S:4, or S:5 is selected.

If S:3 is selected then the list in EC:1 - EC59 would show and so on.

View 2 Replies View Related

Swap Out Text In Text Box Based On Radio Button Selection

Dec 12, 2012

If the user selects French (radio button selection), I want to swap out the existing English text for French and vice versa. One large text box with several paragraphs. Can Excel do this?

View 2 Replies View Related

How To Use For Each Instead Of User Selected List

Mar 31, 2014

I currently have a macro that takes a user selected name and date and creates a time sheet for the selected name. This works just fine, however i have to select each individual person and run the macro for each person, how to automate that part of the macro, so it will automatically create the said sheet for all person at once, rather than me doing it manually.

[Code] .....

The 'CurrentMonth' variable is user selected from a list, and will remain that way.

View 4 Replies View Related

User Selected Range

Dec 3, 2008

I have a form that asks at what row the user wants to start with a selected range then how many rows to select. There will always be 21 columns selected with this range. I am still learning but it has to do with something on how I am setting the Start object. It is not being recognized.

Dim Row As Long
Dim Selection As Long
Dim Start As Range

Row = txtStartRow
Selection = txtHowMany
Set Start = Range("A" & txtStartRow).Select

Range(Start & ActiveCell.Offset(Selection, 20)).Select

View 9 Replies View Related

Copy User Selected Sheets

Jun 5, 2006

how you would write a macro to move a selection of sheets to a workbook called Digi's in the D drive. Also if there isn't a Workbook called Digi's already it needs to add one. I've found some code to loop through sheets but nothing to show what sheets the user has selected

View 4 Replies View Related

Referencing User Selected Workbooks

Aug 5, 2008

I would like the user to select two files, the macro then inputs a formula that includes vlookup to the other sheet. However i am not sure how to reference each workbook.

Sub InsertLocationContents()

Dim rng As Range
Dim LastRow As Long

'OPEN CSV FILE WITH LOCATION CONTENTS

csvFN = Application. GetOpenFilename(Title:="Select Location Contents csv file")
If csvFN = False Then
' They pressed Cancel
MsgBox "Stopping because you did not select a file"
Exit Sub
Else
Workbooks.Open Filename:=csvFN
Workbooks.OpenText Filename:= _
csvFN, Origin:=437 _ .............................

View 9 Replies View Related

Copy Columns From One User Selected Workbook To Another

Apr 27, 2014

I am using this code to copy columns C,D, and P from a user selected workbook into position C,D,E of workbook "Checklist.xlsx" (the one from were I run the VBA code). I don't have a clue about VBA, just have been gathering info, but the code works pretty fine. The only issue is that it opens twice the workbook "wbExt" hence the system prompts me if i want to reopen the already open workbook.

Some questions:

1) Is there a way to copy the 3 columns at once? something like "Columns("C:D, P").Select".
2) Is there a way to select the workbook from were to copy the column without needing it to actually open?
3) is there a way to paste the columns starting from row 3 instead of row 1 (Range("C1").Select)?

View 2 Replies View Related

Insert Range-named Row At User-selected Row

May 3, 2008

On the first row of a spreadsheet template is a <hidden> contiguous series of conditionally formatted cells (range name "stdRow" =production!$1:$1), with formulas, that I want a user to be able to easily insert at whatever row they might be in a worksheet.

If, for example, the user is at D24, then clicks the [InsertRow] button that I have positioned at the top of the worksheet (in a fixed pane), I want the attached macro to insert an instance of "stdRow" directly underneath the user position (at row 25, in this case). The use's position should still be at D24 when the macro finishes. If the user clicks the button multiple times, multiple rows should be inserted (again, without changing the user's position).

This is what I have tried so far:

View 13 Replies View Related

VBA To Select User Multiple Selected Ranges

Feb 9, 2010

The User has made multiple selections with the mouse. The spreadsheet is filtered. The user will usually make different multiple selections on the following columns: A and X through to AR (inclusive).

I just need some code to capture these various multiple selected ranges so that I can copy the selected range as shown below:

View 3 Replies View Related

Concatenate Variable (user Selected) Cells

Nov 14, 2007

I want to do a concatenate for multiple fields, but want the user to specify which cells should be concatenated by entering this in a few fields. What does this formula (or VBA) look like?

Let's assume there is the possibility to concatenate a maximum of 4 cells. Call the 3 cells that will be concatenated cell1, cell2, cell3 and cell4.

On the first sheet of the workbook the user enters the following:
cell1 = Sheet2!A4
cell2 = Sheet2!B4
cell3 = Sheet2!C4
cell4 = Sheet2!D4

Here are some cells and their values:
Sheet2!A4 = Hel
Sheet2!B4 = lo
Sheet2!C4 = World
Sheet2!D4 =

Upon enterring the information after the = sign for the cell1, cell2 and cell3, the formula for the concatenate becomes: =CONCATENATE(Sheet2!A4, Sheet2!B4,Sheet2!C4 ).

The result of the formula is: HelloWorld

If I now change the values of cell1, cell2, cell3, and cell4 the following should happen:
cell1 = Sheet2!B4
cell2 = Sheet2!C4
cell3 =
cell4 =

The formula for the concatenate becomes: =CONCATENATE(Sheet2!B4, Sheet2!C4).

The result of the formula is: loWorld

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved