Forms Option control cell

How can I control the value of one cell (A15) based on which option was
selected in an optionbox on a form?

Thanks,

0
epohxcvii (5)
11/21/2006 10:13:54 PM
excel 39879 articles. 2 followers. Follow

1 Replies
747 Views

Similar Articles

[PageSpeed] 1

You can use the Click event of each OptionButton, like the following:

Private Sub OptionButton1_Click()
    If OptionButton1.Value Then
        Range("A15").Value = 1
    End If
End Sub

Private Sub OptionButton2_Click()
    If OptionButton2.Value Then
        Range("A15").Value = 2
    End If
End Sub
Private Sub OptionButton3_Click()
    If OptionButton3.Value Then
        Range("A15").Value = 3
    End If
End Sub

Or, in a separate procedure

Select Case True
    Case OptionButton1.Value
        Range("A15").Value = 1
    Case OptionButton2.Value
        Range("A15").Value = 2
    Case OptionButton3.Value
        Range("A15").Value = 3
    Case Else
        ' no option button is selected
End Select





"Epoh Rio" <epohxcvii@hotmail.com> wrote in message 
news:1164147234.086404.199130@e3g2000cwe.googlegroups.com...
> How can I control the value of one cell (A15) based on which option was
> selected in an optionbox on a form?
>
> Thanks,
> 


0
chip1 (1821)
11/21/2006 10:46:41 PM
Reply:

Similar Artilces:

linking of outside charts to each cell in the sheet
Hi friends, I have one question. I have numerical data in each cell. I have a chart for each variable plotted in a different application. I am able to copy it. Is it possible to make it appear like a comment appears when I hover over each cell. comment boxes are able to take only text and I am unable to paste it into a comment box.Your help will be appreciated very much. thanking you in advance Hi, A comment can hold a picture. Here are some examples of more fancy comments. http://www.contextures.com/xlcomments02.html#Picture http://www.dicks-blog.com/archives/2005/04/19/funky-comments...

How do I substitute text with a picture as a "comment" to a cell
I have a spreadsheet where in one of the columns I want to have the cells display a picture as I mouse over, akin to creating a comment for the cell. Is that feasible? Thank you, Arik http://www.contextures.com/xlcomments02.html#Picture Tells exactly how to do it. "Arik S" wrote: > I have a spreadsheet where in one of the columns I want to have the cells > display a picture as I mouse over, akin to creating a comment for the cell. > Is that feasible? > > Thank you, > Arik ...

"30" in a cell becomes "50"
When I type in 30 or use 30 in an equation, Excel automatically reads it as 50 and displays it as 50. The keyboard has been changed a couple of times. This also happens in Word. Office has been removed and re-installed to no avail. Any idea as to why or how to fix it? Hi have you checked 'Tools - autocorrection'? -- Regards Frank Kabel Frankfurt, Germany Melanie wrote: > When I type in 30 or use 30 in an equation, Excel automatically reads > it as 50 and displays it as 50. The keyboard has been changed a > couple of times. This also happens in Word. Office has bee...

Separating texts separated by commas in a cell
Please I would like to know how to separate text separated by commas in cell. For example; In a cell containing the text v1,v2,T1. i want t write the texts "v1" , "v2" and "T1" in separate cells. Thank you -- Message posted from http://www.ExcelForum.com somto Data>Text to Columns>De-limited by comma. Gord Dibben Excel MVP On Wed, 21 Apr 2004 20:21:53 -0500, somto <<somto.153bif@excelforum-nospam.com>> wrote: >Please > >I would like to know how to separate text separated by commas in a >cell. For example; In a cell containin...

Forms Problem
Hi everybody, i am having this problem: There was a programmer that made an access aplication with VB Modules, forms, an so on (With Spanish Office 2000), and now the organization change all the aplications to English versions (including Office 2K). The problem is that when i run the access app (With English version of Office 2k) and click on any button, i get this error : Microsoft Office Access can't find the macro 'procedimiento de evento' But when i run de app with Spanish version of Office 2k (in other computer) there is NO problem with the app and works well. Any i...

hide zero values in date formatted cells
Cannot find way to hide the value in cells that have a formula (in Date format). Example: User will enter a date in cell A1. Cell A2 and below will be a sum(A1+1) and copied down. The entire column is in a date format. But we want it all blank until user enter date in A1. One way: You can't do this with formatting, since, with no entry in A1, =A1+1 (you don't need the wasteful SUM() wrapper) will = 1, not zero. Instead, change your formulae to A2: =IF(A1="","",A1+1) and copy down. In article <0e1301c38774$2303bef0$a001280a@phx.gbl>, ...

cell reference within cell reference
i have x values and y values in columns and i add more values everyday I want to have a XY scatter chart which only shows the last 25 entries. Therefore I'm trying to do something like this: cell E1 contains the number of the most recent entry eg 350 x values - A(E1-250) : A(E1) eg would be A100:A350 y values - B(E1-250) : B(E1) eg would be B100:B350 this won't work. Any idea how i can fiddle this -- Message posted from http://www.ExcelForum.com I am going to assume your x-values start in A2, y-values in B2, all on Sheet5 Use Insert|Name|Define and define MyX...

use VLookup to copy more than 1 cell
I have been using VLookup in Excel 2003 for some time but I would like to expand the VLookup results. Instead of just copying one cell to paste as the result of the formula, can I have VLookup copy and paste a series of cells from same row of the found item? Thanks and have a great day!!! :) You can change the result of the VLOOKUP function by changing the 3rd arguement in the function, which determines which column from the table to return. =VLOOKUP(Find_this,In_this_table,#_of_column_to_return,Closest_Match?) If you want to copy and paste this and have it adapt/change, u...

On Drag Cell Event
We are looking for an on drag event for dragging a cell/range. Is there one as there does not seem to be many for a worksheet. If not can one be created? If not why is this not exposed by Microsoft as clearly there is an on drag event on a range. There is no such VBA available event. You can get a pretty good indication if you combine selchange and change, like '************************ Option Explicit Dim R As Range Private Sub Worksheet_SelectionChange(ByVal Target As Range) Set R = Target End Sub Private Sub Worksheet_Change(ByVal Target As Range) If R Is Nothing Then Exit Su...

Combo Box that fills Text Box in form
Hi I am using Windows XP and Access 2000. I have a combo box (courses) on a form that fills a text box (dates), as follows:-- Combo box... Name = course Control Source = schedule.course Row source = SELECT schedule.course, schedule.coursedate FROM schedule; Column Count = 2 Text Box... Name = maindate Control Source = =course.Column(1) This works fine. But there are more than one courses that are the same in the schedule table. ie the course field in the schedule table hold names of courses that are the same eg ICS, SWIFT etc The schedule table holds different date...

Funtion and Cell
Good morning/afternoon I need to execute a function only when the cell "B4" change of value. How can I do it? Thanks in advanced (Office 2003) henpat Hi Henpat, Try something like: '=================>> Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim rng As Range Set rng = Range("B4") If Not Intersect(rng, Target) Is Nothing Then 'Do something, e.g.: MsgBox "Hi!" 'or: Call MyMacro End If End Sub '<<================ This is worksheet event code and should be pasted...

Using COUNTIF but blank cell if zero
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I'd like to count how many times &quot;x&quot; appears in a column but leave the cell blank if the count comes to zero. <br><br>I've had a go with =IF(COUNTIF(J3:J37,&quot;x&quot;)>0,(COUNTIF(J3:J37,&quot;x&quot;),&quot;&quot;)) but am getting an error message. <br><br>What am I doing wrong? <br><br>Thanks in anticipation On 3/3/10 5:27 PM, Ross_Langmead@officeformac.com wrote: > Version: 2008 Operating System: Mac OS X 10.6 (Sn...

Pop Up Form
I make one data base on access for my company. But I face one problem in pop up form. I want that pop form should be show the same record of the main form. For example if main form shows the record of Mr.X & when I will click the comand botton for pop up form (suppose Leave Record) it should show the record of Mr.X & same for Mr.Y ,MyZ etc. Plz help me immediatly. For ur information i put following code in event procedure in command botton. Call Access.Application.DoCmd.openForm(FormName:="Leave Form",View:=acNormal, Datamode:=acFormEdit,windowMode:=acDialog. Sandipan Ad...

Control Alignment in Access 2007
I am having a terrible time moving and re-sizing controls in "Design View" using the new Access 2007 version. In older versions of Access, I could move controls independently of their labels and other controls by clicking and dragging on a "handle" in the top left corner. I do not see a handle in Access 2007, however. Also when I re-size one field, it re-sizes them all, and can't find where to unlink them so that I can format the control separately. The answer is probably obvious, but I can't seem to find it. Can anyone help me with this? Thanks, Jessi To ...

Big Problem opening form !!!
I am getting this message everytime I try to open a form in my database that I am working on. I can open every other form expect this one. What do this mean? "The isn't enough memory to perform this operation. Close unneeded programs and try the operation again." The message means that this form has corrupted. There are various ways you can try to rescue it. Firstly, make a backup copy of the database file, so you get multiple goes at rescuing it. If you had any code in the form's module, I suggest you open your code window, and see if its module is there (on the Win...

force use of a specific domain controller
Is there a way to force exchange to use a specific domain controller for it's AD functions? I am using sites and services but exchange still likes to use the domain controller at the office with the smallest bandwith rather than the server sitting right next to it in the server room! Thanks Matthew Loraditch you may be using Sites and services, but do you have subnets correctly set up for each IP subnet in each site? That's probably one of the biggest considerations. Exchange should use the DC in it's own site first, but you have to have the subnets set up. Barring tha...

Option Button will not hold selection???
I have an option group with four option buttons for "Titles," (Mr., Mrs., Ms., Dr.,)... I have code in the after update event of the option group to populate a combo box with the selection from the option group. If I click Mr. in the option group, Mr. appears in the combo box BUT, the option button next to Mr.: does not remain selected. All of the option buttons are un-selected whether I click one or not. I cannot for the life of me figure out why this is happening!!! Pls Hlp!!! On Thu, 7 Feb 2008 06:53:02 -0800, JK <JK@discussions.microsoft.com> wrote: >I have an o...

password protected certain cells in spreadsheet
Hi folks, can I use password protect some cells and use another password protect some other cells within the same workbook?? using vba/marco?? Thnaks VV If I understand correctly, you can have different passwords for different worksheets, but not different passwords for different cells on a single sheet. On Tue, 8 Feb 2005 18:23:03 -0800, "vv" <vv@discussions.microsoft.com> wrote: >Hi folks, > >can I use password protect some cells and use another password protect some >other cells within the same workbook?? using vba/marco?? > >Thnaks >VV xl2002 a...

Using Group Policy to control Outlook security/attachments behaviour
Hi Are there any easy instructions on how to set Outlook 2007 security via group policy settings? Many Thanks Regards "John" <info@nospam.infovis.co.uk> wrote in message news:O8disCWvKHA.6140@TK2MSFTNGP05.phx.gbl... > Are there any easy instructions on how to set Outlook 2007 security via > group policy settings? This question isn't clear enough. There are multiple security features in Outlook. Which one(s) are you trying to control? What happens now and what would you like to happen? Exchange account? -- Brian Tillman [MVP-Outloo...

cell comment #2
Hi all, In cell B6 I have a formula like this: ="sometext "&G6-H6&CHAR(10)& " state = " & round(AB6;2) & " (until date " & TEXT(TODAY(); "d-m-yyyy") & ") " & CHAR(10) & " balance = "&Q6 This results in three lines of text that I want to put in the cell comment of N6 (that may or may not already have a cell comment that could have text or nothing in it). I tried a lot with code like Range(...).ClearComments Range(...).AddComment Range(...).Comment.Visible = False ...

Still can not find an option
Excel 2007 ... trying to find the option to email a single sheet from a workbook but not having any success.. have gone to the options > customize and looked in ALL available but do not see one for send this worksheet by email... only selection is send workbook.... is it named diferently in this version or can someone direct me where to go exactly within the customize menu.... thanks On Jan 26, 12:57=A0pm, TechnoGram <mumz...@hotmail.com> wrote: > Excel 2007 =A0... =A0trying to find the option to email a single sheet > from a workbook but not having any success.. have gone...

multiplying a cell by a set number
i want to multiply a row of boxes(my hours) by a set number (my wage), then have the product placed in a 3rd box. Then i want to be able to take that 3rd box and add it with another variable to go to another box. i basicly want to multiply my hours by my wage, then add my wage with my tips for a total. But i want to see all these numbers on the page individually. thanks in advance for the help. Hi Gunny86, if you place your wage in a cell say A3 then enter the following in cell in B1 type the no of hours you worked then in B2 type =B1*$A$3 this will give you your total wage, you can th...

Eliminate / Hide Title Bar on a form
Is there any way in VB 2008 to hide the Title Bar on a form? I have a dedicated computer which is going to run only my application. I want to at a minimum to hide the Min/Max/Close buttons on the title bar, but would actually prefer to simply not have it at all. Thanks, John "John Tripp" <JohnTripp@discussions.microsoft.com> wrote in message news:D5DE09C2-EB11-4DA9-A3E2-DDC3BEE54DAB@microsoft.com... > Is there any way in VB 2008 This group is for VB6 and earlier(VB Classic). VB.Net and all dotnet groups have either "dotnet" or "vsnet&qu...

Need help in highlighting the cell color in VBA
Hi All, I am new to the excel VBA. Your help is appreciated. Please Help me in vba code for the following points. I have attached the sample file of how i get and what changes would required once after i run macro in the excel. 1) Sum to column. 2) If city code numbers are same then highlight the cell backgaround color. 3) Merge the cell and highlight with the color. Note: Data may vary. eg If today i am getting 100 tomorrrow it may 1000. Regards Praveen. -- xllearner ------------------------------------------------------------------------ xllearner's Pro...

HELP: Unable to clear values for control of type text in a userfor
Hi All, I have textboxes and comboboxes located in Frame1 and I only want to clear values in Textboxes when a user changes Student_Id field Here is my code so far: Private Sub StudentId_Change() For Each ctl In Me.Frame1.Controls If TypeOf ctl Is TextBox Then ctl.Value = "" End If Next End Sub For some reason the values in textboxes are not cleared, I inserted break points and found out that the control type of Textbox is not identified and hence passes the If statement directly to End if Thanks in advance Hi Try MSForms.Textbo...