+ Reply to Thread
Results 1 to 3 of 3

option buttons for data table

Hybrid View

alee001 option buttons for data table 04-07-2012, 01:38 AM
Mallycat Re: option buttons for data... 04-07-2012, 01:43 AM
alee001 Re: option buttons for data... 04-08-2012, 10:09 AM
  1. #1
    Forum Contributor
    Join Date
    03-31-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    140

    option buttons for data table

    I created a dialogue box with 3 option buttons in order to change between result and answers target, but there are wrong array results after code. Why and how to solve it? thanks

    Private Sub RunTestCommandButton_Click()
    'result is target for table
    If OptionButton1.Value = True Then
        Range("result") = Range("ans_A")       'ans_A is answer from equation A f(x,y)
     ElseIf OptionButton2.Value = True Then
        Range("result") = Range("ans_B")       'ans_B is answer from equation B f(x,y)    
     ElseIf OptionButton3.Value = True Then
        Range("result") = Range("ans_C")       'ans_C is answer from equation C f(x,y)
     End If
    Range("table").Select                              'table is data table for array results by parameters 
        Selection.Table RowInput:=Range("x"), ColumnInput:=Range("y")     'x and y are parameters for equation A, B & C f(x,y)
        Calculate

  2. #2
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

    Re: option buttons for data table

    please post the full spreadsheet.

  3. #3
    Forum Contributor
    Join Date
    03-31-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2010
    Posts
    140

    Re: option buttons for data table

    After I tried more test, I can solve the problem which is change Range("result") = Range("ans_A") to Range("range").Formula = "=ans_A". Now the Range("result") is variable and can be done for array results during run data table.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1