Question: Problem 1 : Write an event handler for the second worksheet. When activated, a message box showing the time in minutes since midnight ( rounded
Problem :
Write an event handler for the second worksheet. When activated, a message box showing the
time in minutes since midnight rounded down to an integer and the worksheets name should
be displayed. HINT: Dont hardcode the worksheet name use VBA to get the name. If the
name of the sheet is changed by the user, the message box should reflect that.
Problem :
In module ModuleProblem write a function SumAbsDiff that takes ranges as input and
gets the sum of absolute difference of every element if these two ranges have the same numbers
of elements. The function outputs string Error if the size of these two ranges are different.
Hint: Use cellsi to get the ith element of a range
Place this function into the green cells on the first worksheet and use it the evaluate the absolute
difference of the blue and red cells. You will have to do this twice: they are grouped by cell
borders.
Problem :
The program in Example Pgs and is written as a single sub. Break it into at least
three shorter subs, all called from a Main sub. You can decide how to break it up and whether
you want to use modulelevel variables or pass arguments. Input data is in worksheet Data
ISEN : Homework Function and Event Handler
Due
Problem : Note: Save your code in module ModuleProblem
Write a function MyFunction which takes as input a range and an integer which
returns:
a The sum of the range if the integer argument value is
b The sum of squares of the range if the integer argument value is
c The average of the range if the integer argument value is
d Nothing if the integer argument value is anything else
Use VBA to place the function from part in cell C on the worksheet A First use input
boxes to take the input arguments. Set the default value of the range argument to
a:a A command button that calls this sub should be placed on worksheet A
Hint: Use the formula property
Write a sub which appends a random number between and inclusive of cells with a
random value between and inclusive to the end of the list of numbers in column A
When the workbook is opened:
a Select worksheet B
b Call the sub from part
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
