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!
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!
or will this work better with checkboxes? thanks!
or will this work better with checkboxes? thanks!
help please.
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:
This option requires all variables to be declared and will give a compiler error for undeclared variables.Please Login or Register to view this content.
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks