+ Reply to Thread
Results 1 to 5 of 5

Option Button to Pull Data from Another Sheet

  1. #1
    Forum Contributor
    Join Date
    10-18-2015
    Location
    manila, philippines
    MS-Off Ver
    MS Office 2010
    Posts
    186

    Option Button to Pull Data from Another Sheet

    Hi Experts,

    I attached the file as my sample. I'm looking to achieve pulling cell data from "Source" sheet and show it in "Main" sheet, is this possible with the use of option buttons? Thanks!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    10-18-2015
    Location
    manila, philippines
    MS-Off Ver
    MS Office 2010
    Posts
    186

    Re: Option Button to Pull Data from Another Sheet

    or will this work better with checkboxes? thanks!

  3. #3
    Forum Contributor
    Join Date
    10-18-2015
    Location
    manila, philippines
    MS-Off Ver
    MS Office 2010
    Posts
    186

    Re: Option Button to Pull Data from Another Sheet

    or will this work better with checkboxes? thanks!

  4. #4
    Forum Contributor
    Join Date
    10-18-2015
    Location
    manila, philippines
    MS-Off Ver
    MS Office 2010
    Posts
    186

    Re: Option Button to Pull Data from Another Sheet

    help please.

  5. #5
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Option Button to Pull Data from Another Sheet

    Hi markusvirus,

    The attached updated copy of your file that uses the code that follows below should help you get started.

    In your case CheckBoxes are needed, because more than one selection can be active at the same time.
    When an OptionButton is used, the OptionButtons are usually in a Group. Only one item in the Group can be active (checked) at a time.

    Please note that there are two types of Controls that can be used on a Spreadsheet:
    a. Forms Controls
    b. 'Active X' Controls

    For a discussion of the advantages and disadvantages of each, and how to recognize each one see: http://www.excelforum.com/excel-prog...ml#post4023368


    How the Software Works:
    a. One time only - Macro AddFormsCheckBoxesInRows2thru16InColumnA() is used to add 'Forms' CheckBoxes
    b. When the previous step was run, each CheckBox:
    (1) had the cell address appended to the Name of the CheckBox (e.g. 'CheckBoxA2')
    (2) had a Macro associated with the CheckBox that would be activated each time the CheckBox was checked or unchecked.
    The same Macro is associated with each CheckBox.
    c. When a CheckBox is checked or unchecked Macro FormsCheckBoxEventHandler() is called. It determines:
    (1) the Name of the CheckBox
    (2) the CheckBox value (Checked or Unchecked)
    d. The Macro copies or clears data as required.

    In ordinary code module ModFormsCheckBoxes:
    Please Login or Register  to view this content.

    It is a best practice to declare all variables. If you misspell a variable in your code, VBA will silently assume it is a Variant variable and go on executing with no clue to you that you have a bug. Go to the VBA development window, click Tools, Options, and check "Require Variable Declaration." This will insert the following line at the top of all new modules:
    Please Login or Register  to view this content.
    This option requires all variables to be declared and will give a compiler error for undeclared variables.

    If you need help with Macros the following may help:
    To enable Macros and to Run Macros see the following:
    http://office.microsoft.com/en-us/ex...010031071.aspx
    http://office.microsoft.com/en-us/ex...010014113.aspx
    If help is still needed do a google search for 'youtube excel enable macro' and/or 'youtube excel run macro'.

    To access Visual Basic (VBA) see:
    http://www.ablebits.com/office-addin...a-macro-excel/
    a. Click on any cell in the Excel Spreadsheet (may not be needed).
    b. ALT-F11 to get to VBA.
    c. CTRL-R to get project explorer (if it isn't already showing).
    d. Double Click on a 'Module Name' in 'Project Explorer' to see code for that module.

    Lewis

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Option Button LinkedCell using VBA - will not reference different sheet
    By DwinZly in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-22-2015, 12:56 PM
  2. [SOLVED] Fill a listbox from a non active sheet with option button
    By molesy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-13-2014, 07:44 AM
  3. [SOLVED] Sort sheet when option button selected
    By Macfool in forum Excel General
    Replies: 6
    Last Post: 01-28-2014, 01:08 PM
  4. Option button click ... then focus back to sheet ?
    By dannac in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2012, 02:05 AM
  5. Using Excel option button to prepare a answering sheet
    By gpattanaik in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 11-15-2012, 04:14 PM
  6. option button sends information to the sheet when the names match
    By Quicksnot in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2012, 02:44 PM
  7. [SOLVED] Option Button on sheet changes size in 1024 by 768 resolution
    By Michael Tress in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-13-2006, 05:10 PM

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