Question

In: Computer Science

Excel to VBA Please post with screen shots Add a few Check Box controls or Option...

Excel to VBA

Please post with screen shots

Add a few Check Box controls or Option Button controls to a worksheet and then use a Select/Case code structure in a sub procedure that outputs a message to the user telling him which box or option has been selected.

Solutions

Expert Solution

Below is the VBA code. Two sub procedure are created for two checkbox selection.

Code-

Private Sub CheckBox1_Click()
Dim num As Variant
If CheckBox1.Value = True Then num = 1 ' True condition of checkbox 1 selection
If CheckBox1.Value = False Then num = 2 ' False condition of checkbox 1 selection
' Select to print values on conditions to be true
Select Case num
Case 1
MsgBox "The checkbox1 is SELECTED"
Case 2
MsgBox "The checkbox1 is UNSELECTED"

End Select
End Sub

Private Sub CheckBox2_Click()
' Logic for 2nd checkbox
Dim num2 As Variant

If CheckBox2.Value = True Then num2 = 3
If CheckBox2.Value = False Then num2 = 4

Select Case num2

Case 3
MsgBox "The checkbox2 is SELECTED"
Case 4
MsgBox "The checkbox2 is UNSELECTED"
End Select
End Sub

Code screenshot-

Output-


Related Solutions

USING EXCEL!! FOR BOTH PROBLEMS SCREEN SHOTS OF WORK PLEASE 19. Write the following primal problem...
USING EXCEL!! FOR BOTH PROBLEMS SCREEN SHOTS OF WORK PLEASE 19. Write the following primal problem in canonical form, and find its dual. Max 3x1+1x2+5x3+3x4 s.t. 3x1+1x2+2x3 = 30 2x1+1x2+3x3+1x4 >= 15 2x2+3x4<= 25 x1,x2,x3,x4 >= 0 20. Photo Chemicals produces two types of photograph-developing fluids at a cost of $1.00 per gallon. Let x1 = gallons of product 1 x2 = gallons of product 2 Photo Chemicals management requires that at least 30 gallons of product 1 and at...
In java, write a class that tests the following code. Add screen shots as well. public...
In java, write a class that tests the following code. Add screen shots as well. public class DoubleStack<E> {    private E[] elements;    private int top1, top2;    private static int DEFAULT_SIZE = 10;       public DoubleStack() {        elements = (E[])new Object[DEFAULT_SIZE];        top1 = 0;        top2 = elements.length - 1;    }       public boolean isFull(int stack) {        if(top2 == top1 + 1)            return true;   ...
Run the following ANOVA analysis in excel and interpret your findings. Upload your screen shots of...
Run the following ANOVA analysis in excel and interpret your findings. Upload your screen shots of the steps you took in running the analysis in excel. Treatment 1 Treatment 2 Treatment 3 0 1 6 1 4 5 0 1 8 3 2 5
Run the following ANOVA analysis in excel and interpret your findings. Upload your screen shots of...
Run the following ANOVA analysis in excel and interpret your findings. Upload your screen shots of the steps you took in running the analysis in excel. Treatment 1 Treatment 2 Treatment 3 0 1 6 1 4 5 0 1 8 3 2 5
please do it in C++, will up vote!! please add snap shots of result and explanation....
please do it in C++, will up vote!! please add snap shots of result and explanation. You are to create a recursive function to perform a linear search through an array. How Program Works Program has array size of 5000 Load values into the array, equal to its index value. Index 5 has value 5, index 123 has value 123. Pass array, key, and size to the recursive function: int recursiveLinearSearch(int array[],int key, const int size, bool & methodStatus) User...
please do it in C++, will up vote!! please add snap shots of result and explanation....
please do it in C++, will up vote!! please add snap shots of result and explanation. You are to create a recursive function to perform a linear search through an array. How Program Works Program has array size of 5000 Load values into the array, equal to its index value. Index 5 has value 5, index 123 has value 123. Pass array, key, and size to the recursive function: int recursiveLinearSearch(int array[],int key, const int size, bool & methodStatus) User...
What option in Virtual Box allows you to add additional virtual hard disk to a virtual...
What option in Virtual Box allows you to add additional virtual hard disk to a virtual machine? (Take screenshots of the steps)
Please note: This is in Visual Basic. Create an application. Add a text box, a label,...
Please note: This is in Visual Basic. Create an application. Add a text box, a label, and a button to the form. If the user enters a number that is greater than 100 in the text box, the button's "click" event procedure should display the result of multiplying the number by 5. Otherwise, it should display the result of dividing the number by 5. Code the procedure.
Can you please post the excel answers and post the (SHOW FORMULAS) button as well so...
Can you please post the excel answers and post the (SHOW FORMULAS) button as well so I can see how you solved the question The Air Marshal Co. has recently completed a $10,000,000 two-year marketing study.  Based on the results of this study, Air Marshal has estimated that 800 units of its new security electro-optical human scanning hardware, known as "Marshal Dillon," could be sold annually over the next 12 years, at a price of $110,000 the first year with an...
Can you please post the excel answers and post the (SHOW FORMULAS) button as well so...
Can you please post the excel answers and post the (SHOW FORMULAS) button as well so I can see how you solved the question The Air Marshal Co. has recently completed a $10,000,000 two-year marketing study.  Based on the results of this study, Air Marshal has estimated that 800 units of its new security electro-optical human scanning hardware, known as "Marshal Dillon," could be sold annually over the next 12 years, at a price of $110,000 the first year with an...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT