Change User Input Values Depanding On Option Buttons

Oct 8, 2008

I have set up an option frame with two options. If I click on option A it shows below a frame with txtLenght and txtWidth.

If I use option button B it shows me on the same spot a different frame with txtSQM. I need that so I could either enter the length and width to get the sqm or I do already have the sqm value.

When I set up the code I would like to use an input message saying "Enter Lenght & Width" but if I use the other option it would need to say. "Enter the sqm value".

How or what code do I need to enter to be able to seperate those two from each other.

But also it is important that it does only calculate either the value in sqm or the values from length and width.

View 9 Replies


ADVERTISEMENT

User Form - Option Buttons 2003

May 18, 2009

I have a user form set-up that has four option buttons on it. I have them set so that when the user clicks on one of them the others are unset, however for some reason the user is having to double click on the buttons before they are set (with a black dot in them). It is as if the first click sets focus and the second click sets the button.

Can i amend it somehow so that the user only has to click once?

View 9 Replies View Related

Input Data Into Option Buttons, Listbox, Text Box Etc In A Frame In Web Pages

Mar 25, 2007

How can data be input through option buttons, textbox, listbox, combos, checkbox in web pages organised in frames?

View 3 Replies View Related

Change TabIndex On Userform Option Buttons?

Oct 29, 2011

I have a userform with Option Buttons. I have them all initialized as deactivated except for one at a time as the user performs certain tasks (e.g. Create a new worksheet with the name "database"). Once each task is completed, the previously activated option button becomes deactivated and another option button becomes activated. That works fine. My problem now is that I can't change the default tab index settings to put the black dot next to the activated option button:

This doesn't seem to work:

Code:
If Sheets("Database").Range("A1") vbNull Then
Controls("OptionButton1").Enabled = False
Controls("OptionButton1").TabIndex = 1
Controls("OptionButton2").Enabled = True
Controls("OptionButton2").TabIndex = 0
End If

View 2 Replies View Related

Change Option Buttons To Checkboxes On Userform

Apr 21, 2012

I have a userform with a lot of OptionButtonson it.

(a few pages on the userform * a lot of OptionButtons per page = a lot lot OptionButtons)

I need to change them all to checkboxes ... Is that possible? For example:

Code:
Dim oCnt As Controls
For Each oCnt In myform.Controls
If TypeOf oCnt Is msforms.OptionButton Then
TypeOf oCnt = msforms.CheckBox
End If
Next

Syntax error in line: TypeOf oCnt = msforms.CheckBox

But I always have an error.

View 7 Replies View Related

Macro Window With Buttons To Accept User Input

Jan 2, 2009

I'm very new to Excel and definately to macros/vba. I've already received a tremendous amount of help with this file but I'm am really struggling here and getting very frustrated! I've got a pretty good handle on the excel part but the macros/vba is another story. Here is what i'm attempting to do: I've created a form "frmMacroButtons" which has 8 buttons. When the workbook is opened I want this form/window to launch. I want the user to be able to select any of the buttons but also be able to just click into the worksheet manually if wanted but have the window stay open to go back to use the buttons. Each of the buttons I've typed a description of what I want each of the buttons to do in the code view.

View 14 Replies View Related

Excel 2013 :: CF With 2 Option Buttons / Multiple Option Groups?

Sep 6, 2013

I have several option groups (Y & N in each) linked to cells to display TRUE / FALSE depending on which option is selected in each group. I have another cell which I want to apply conditional formatting to if EITHER Y or N is selected in all groups. At present I use COUNTIF to check for FALSE=0 in the linked cells which works if all the answers are Y. How do I apply CF if there is a mixture of Y & N (TRUE / FALSE) in all groups (I'm not sure if I've explained that well or not).

Excel 2013

View 1 Replies View Related

Combine Two Tables Which Change In Rows Depending On Input Of User Using VBA In Excel?

Apr 13, 2014

i have a macro which takes the results generated and puts them into a table and filters the data so that zeros does not show and arranges the table from largest to smallest. Now i have a problem where i need to select the power, fuel oil consumption, weight and area from one table and the other power, fuel oil consumption, weight and area from the other table and combine them together so that i can have all possible combinations of the data, but i don't want the zeros to show in the combinations. i need the combined data to show on a separate sheet. The data of table 1 varies with rows as shown:

The Data of Table 2 varies with rows as shown:

I would like to achieve a result like this in the following columns and rows without having to input them manually:

View 1 Replies View Related

How To Change Variable Data Type To String If User Input Is Not A Number

Jun 3, 2014

I have declared a 'long' variable. however; how do I change the variable data type to string if user input is not a number? how do I recognize the user input's datatype?

View 7 Replies View Related

Reference Cells Keeping Columns The Same But Change Row Number Based On User Input

Dec 10, 2012

Date
#
Lname
Fname

[Code].....

With that said, I want to put the row number of a user in (I have a few thousand on this spreadsheet, and all the = data be automatically pulled based on the row number I put in cell B1. So I'm hoping to write in cell B1 the following - "143" (without the quotes), and the remaining cells in column B automatically pull that data based on that, so it would look like the following

Row #
143
Name:
=C143&" , "&D143&" "&E143

[Code]....

How do I write the functions to keep the columns the same, but change the row number based on the number I input?

View 3 Replies View Related

Option Buttons

Aug 23, 2007

I created a frame in a spreadsheet I put in 2 options buttons that I called Left the first one and Right the second one. I got 2 cells lets say C10 and G10 in these 2 cells I write the cell number values. When I click on button one or Left, I need the cell C10 be set focussed and write a number e.j 5. However, when click on the second butt to write a number e.j 7, the number in the cell C10 still there, so, what I need is a cero or an empty cell C10, and viceversa. Could you help to write a code for this problem.

View 9 Replies View Related

Set All Option Buttons To No

Jun 26, 2007

is there a way to set all yes/no option butons to "no" when a worksheet is activated?

View 5 Replies View Related

How To Unload Option Buttons

Jan 17, 2014

Attached I have kind of a score card, when you open the tab named TEAM1 a userform pops up and I pick the partners that played together, then I can pick an option button labeled 0,1,2 or 3, when it unloads, is it possible to make it put the corresponding number by their names in the empty row (W) of the week they are playing?, and not just the 1st open row available?

For example, if I pick the names Ryan and Stu the number will go under week 10 (X3) and not find the empty cell in (J3)?, I have no clue how to make this happen, but I made a userform to use, to try and make it work.

POOL LEAGUE TEST.xls

View 8 Replies View Related

ActiveX Option Buttons VBA

Mar 19, 2014

I am looking for a way to use 2 optionbuttons in vba. The option buttons are in different groups, and are independent.

I cannot get this to work. Is this even possible? In sheet1, the vba would read something like this.

View 9 Replies View Related

Option Buttons And Combo Box

Jun 2, 2009

I use Excel2007 and saved this workbook as excel2003, the combo box doesn't dropdown anymore? I don't understand why....is it just settings? If you could have a look at the code I use for the option buttons...when I select the first optionbutton it calls the msgbox without selecting the offset cells. From optionbutton2 onwards it works fine.

View 4 Replies View Related

Option Buttons To Use For Searching

Jan 13, 2010

I know that there is an ocean of information out there with regards to option buttons, but for the life of me I am unable to find what it is I am looking for. So I will try to explain what I am trying to do as best as possible. In my workbook I have 4 sheets. Sheet 1 contains all the data. The remaining sheets have taken all the data and broken it down by machine type. IE(carton errector, Carrier errector, etc) I have a series of user forms that you would navigate through to perform a search. For This example frmMain_menu is where the user would start out. I only have code added for the first button (Pearson).

This will bring up another form with more options for the user to select. Currently I only have code for the Carton Errector button. Once the user has selected that button frmCarton_Errector pops up and it has a series of 12 option buttons to choose from. What I am trying to accomplish is say the user selects cylinders, I would like once the search button is clicked for the program to is search sheet2 col f for the caption value of the option button selected. Any hits that it might find I would like to display certain datafrom the rows in a list box.(IE col A,B,G)

View 4 Replies View Related

Option Buttons And Images

Jan 11, 2009

I have in a Useform 4 OptionButtons. This is working Ok to a point. My Question is, I have 12 images. I like to show a particular image depending on what option is choosen. As of right now if Optionbutton1 is selected. The right image is shown. But if 2 OptionButtons are selected the wrong image can be shown. So, it leads me to think I need and if or statment in the code? If so how can this be done in a example.

Private Sub OptionButton1_Click()
ActiveSheet.Unprotect
If OptionButton1.Value = True Then Sheets("HAAS INT. NPT THD. 1 PASS").Range("E10") = "M03" '= CW RH HAND THREAD

If OptionButton1.Value = True Then Me.Image2.Visible = True 'Conventional Int. Left Hand
If OptionButton1.Value = True Then Me.Image3.Visible = False 'Climb Int. Left Hand
If OptionButton1.Value = True Then Me.Image4.Visible = False 'Climb Int. Right Hand
If OptionButton1.Value = True Then Me.Image5.Visible = False 'Conventional Int. Right Hand

ActiveSheet.Protect
End Sub

Private Sub OptionButton2_Click()
ActiveSheet.Unprotect.................

View 9 Replies View Related

Round Option Buttons

Jul 5, 2009

the code below produces a message box with square command buttons. Anyone know how to make it appear with round option buttons?

Selection.Copy
ans = MsgBox("Are you sure you want to clear the entire workbook?", vbYesNo, "CLEAR ALL")
If ans = vbNo Then
Application.CutCopyMode = False
Exit Sub
End If
If ans = vbYes Then

View 9 Replies View Related

Creating Option Buttons

Sep 1, 2009

I want to have 2 groups of option buttons, and create them similar to the way I've created textboxes (as shown here):

With Sheets("sheet1").TextBoxes.Add(10, 5, 100, 100)
.Interior.ColorIndex = 4
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Caption = "Check Selection"
.Border.Weight = xlThick
End With

When I try:

With Sheets("sheet1").OptionButton.Add(20 , 5, 100, 100)

I receive a runtime error 438

Also, how can I set up the grouping options, and have a default selection already picked?

View 9 Replies View Related

Resetting Option Buttons

Mar 25, 2005

I have a spreadsheet to keep track of purchase orders, and I use groups of option buttons to run macros to filter the info by category using auto filters. Not sure if I'm explaining this well, but as an example, I have one set of option buttons for whether the items are late, and one for whether I have flagged the order for some reason, and a couple of others. It does everything I want, basically.

I have a button which resets all the autofilters in one go, but the problem is it doesn't put the option buttons back to the "Show all" option for their categories. I tried recording a macro and clicking in the "Show all" option so I could look in the code to see how it refers to it, but it just says to run the macro, nothing about selecting "Show all".

Also, the way I reset all the autofilters is to have a macro that goes to every autofilter in turn and selects "(All)". Is there a better way of doing this?

View 9 Replies View Related

VBA Images And Option Buttons

May 17, 2006

I have a spreadsheet with a set of 5 option buttons within a group box. What i want to be able to do is select an option and depending on the option an image above changes to reflect the option selected.

E.G.

Option 1 selected shows diagram 1

Option 2 selected shows diagram 2

Etc.

View 9 Replies View Related

2 Option Buttons In The Same Event

May 18, 2006

How can i get 2 events to work in the same sub?

If Me.optColorbond Or optZInculume.Value = False Then
MsgBox "Please select the Parapet material type", vbOKOnly, "Material Type"
End If

at the moment it still produces the message when the colorbond optbutton is true

View 5 Replies View Related

Grouping Option Buttons

Mar 21, 2007

Is there a way to have mulitple groups of option buttons? I need to have different sections that can choose from a group of options buttons, right now when I add more buttons, only one button is selected. I'm not seeing where I can group them (the group option will not hightlight). I created the Options Buttons using the Form tool bar, if that makes a difference.

View 6 Replies View Related

The Philosophy Of Option Buttons

May 19, 2007

I noticed that it has a frame, and within the frame are three option buttons. I became quite curious as to the relationship between option buttons and the frame. With no coding on my part, the little buttons seem to mystically sense their presence inside of a frame, and dutifully acquiesce to whichever new option is clicked, so only one option at a time may be true. I decided to experiment. I created one lone option button outside of the sacred frame. I was able to click it on, and, lo and behold, I could not click it off! When I cut and pasted it inside the frame, with its brethern, it automatically became obedient. Well, I pasted it again outside the frame, and experimented with how I might turn it off. Now, my perverse nature began to sense that such behavior is the venue of a checkbox and not an optionbox. But, like Don Quixote, jousting at windmills, I was determined to have my way. The only methods I found to turn a lone ranger option box off, once checked, was to use the keydown option, and set it to false, which is obscure and tacky to say the least, or to place a label next to it, entitled, "turn the blasted thing off" and, in its click event, set the option button to false.

What I deduce from all of this is that the proper function of the option button lies within the boudaries of a frame, with one or more brethen option buttions. Am I correct in my surmize? And otherwise, one should be using a check box, which may be toggled on or off to the heart's content?

Hmmm. I have not thought to test the function of checkboxes residing within a frame (until just now!).

Experimentation reveals that if I add several check boxes to the frame containing the option buttons, there is no apparent affect. The option buttions still obey the frame rules for radio button logic, and the check boxes may be toggled on and off at will.

So, I ask myself the next obvious philisophical question, namely "what would be the use for a lone option button that, once turned on, could NEVER be turned off.

Well, in our society, I can think of two obvious applications.

One: "Have you ever been a member of the Communist Party"

Two: "Have you ever been attracted to the same sex."

Now, in our society, once there is the slightest hint of either option, it can NEVER be turned off. Even if you need better reading glasses, and you mistook "same sex" for "SOME sex", no matter, you checked the option and now you are branded.

And if you want to cancel my form, think again, because my VBA code updates with ever change event.

This option button philosophy suggests to me an interesting social commentary. I was once asked to write a literary analysis of the movie, "Brokeback Mountain" and the short storie by Annie Proulx. I asked various people, randomly, if they had seen the movie. I asked one African American male, and he recoiled from me and say "Ewww, you would watch that movie." In his mind, I had checked that option box, and there was no turning back. I gave him the following explanation. "Imagine an athlete who was notorious for seducing over 1000 women, but suddenly the tabloids revealed that as a teenager, he had one same-sex involvement. What would you say of him?" Of course the answer was that he was one of those "brokeback mountain" folks. So, then I asked him, "well, suppose someone was notorious for 1000 same sex involvements, but the tabloids revealed that, as a teenager, he had a relationship, with a girl?" Well, we know the reaction, same thing "a brokeback mountain fellow."

So, I progressed to a similar analogy. I said, "You see me as Caucasian, but, suppose you learned that my great great great great grandparent was African? Would you then see me as African-American? But, if your great great great great grandparent had been Caucasian, would you consider yourself Caucasian." He became quite flustered and said "that is different."

But, aha, is it really so different? Therefore, in our society, in our values, in our minds, in our stereotyping of others, we do require the data type of the lone optionbox, which can only be checked ON, and once on, can NEVER be checked off.

And, yes, this post is pertinent to excel vba forms, because the purpose of our forms and our datastructures is to accurately mirror our thinking, our values, and our society.

View 9 Replies View Related

Option Buttons On Worksheets

Apr 2, 2008

If I have two optionbuttons (controls) on a sheet, may I define the same linkedcell for these two optionbuttons, or only for one of them ? My question arise from the fact that I meet sometimes an error message ("The cell or chart you are trying to chage is protected...") although the linkedcell is unlocked on the protected sheet (which is not the sheet where the two optionbuttons are placed).

View 2 Replies View Related

Control Option Buttons On One Sheet?

May 20, 2014

I have a spread sheet and I want to have multiple option buttons on it. but for separate things

e.g. I need roughly 50 option buttons. however. I want about 25 groups of them.

so I want 2 buttons next to a cell where user can select one. then I want 2 more on cells below where user selects one for a different question

but at the moment, every single option box copies every other box when I changed the format control cell reference. even though I haven't copied and pasted them!

View 9 Replies View Related

Message Box Option Buttons Not Working

May 22, 2014

I have a form with the following code:

[Code] ......

My problem is that no matter which option button is selected, all I get is the results for Case 2 and then the vlookup doesn't work. So if the user wants to cancel and reenter a new clock number they have to close the form and manually reopen it.

This was working until I decided I wanted a vbOKCancel instead of a VbOkOnly. However the uploader is not working for me.

The best I can do is a link for OneDrive [URL] ......

View 2 Replies View Related

Disassociate Clusters Of Option Buttons

Nov 18, 2008

I have a spreadsheet with three clusters of option buttons, with 3 option buttons in each cluster, for a total of 9 buttons. All three clusters appear to be associated, as only one of the 9 buttons can be selected at one time. I need each cluster to be independent of the other, as each will control a different calculation.

View 4 Replies View Related

Selection Order Of Option Buttons...

Nov 22, 2008

I have a group of 3 Option Buttons that are grouped by a Group Box. I added another Option Button and placed it in the third position, moving the button that was originally third to the bottom. When I select the fourth button (that was originally the third of three) it still returns a 3 in the linked cell, and when the new button (placed in the third position) is selected, the linked cell returns a 4. How do I change the order that the linked cell sees? In the attached spreadsheet, the Group Box in question is the Pricing Method on the Tow worksheet.

RateCalcApp.xlsm

View 3 Replies View Related

Using Shapes In Place Of Option Buttons?

May 22, 2014

I was re-reading Chnadoo's thread below on using a hyper link to drive a formula, and was wondering if there was a way to do the same thing with shapes. Interactive Dashboard in Excel using Hyperlinks | Chandoo.org - Learn Microsoft Excel Online I tried doing it where I used a hyper link on each shape to link to a cell containing a number, that in turn would be picked up by the cell that I would want to be incororated in to an INDEX function.

Let's say cells A2 to D2 contain the numbers 1 to 4. Cells B3 to D3 have an oval shape which are each linked to the cell above it by a hyperlink.

Upon selecition of any of the shapes I was trying to get the corresponding number to appear in cell P1 by way of very basic VBA. I was trying to get it to pick up the number by way of referring to the ActiveCell, but cell P1 wouldn't update automatically upon each selection of a new shape.

I know there are other ways to get what I want with scroll bars, spin buttons etc but I'm interested to know if it can be done with shapes.

View 1 Replies View Related







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