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...
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
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)
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...
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...
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