Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running code from form button
I would like to have a form where when a question is asked, if you click the
radio button (er, "Form Toolbox 'Option' button"), you will get different results based on whether or not you click "Yes" or "No". (Separate buttons - one for "yes" and one for "no") I've assigned the Format control cell link to a certain cell, and then written code referencing the value of that cell. If I simply TYPE a "1" or a "2" in that cell (cell D8), the code runs fine. But clicking the radio button (which changes the value of that cell to "1" or "2") does nothing. Is there a way to accomplish this? Here's the code: ========================== Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$D$8" Then If Target.Value = "2" Then Application.Goto reference:="N", Scroll:=True ElseIf Target.Value = "1" Then Application.Goto reference:="Answer_A", Scroll:=True End If End If ========================== Thanks for the help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to prevent code running when in a worksheet code | Excel Programming | |||
Command Button vs Form Button | Excel Programming | |||
User Form Button Code | Excel Programming | |||
Running command button click event code | Excel Programming | |||
Command Button vs Form Button | Excel Programming |