Question
- Need help writing VBA code that displays the specified number of random values. - Instead of using Msgbox and InputBox, create a simple worksheet
- Need help writing VBA code that displays the specified number of random values.
- Instead of using Msgbox and InputBox, create a simple worksheet where argument needed by triangular function can be typed into the worksheet by the user.
- Check to see if the new worksheet already exists, and delete the old one.
- Use cell Styles for results generated using code, and protect the worksheet
- Especially, write you "function" into the result sheets, not outputting the numbers only, and not using WorkhseetFunction technique.
- The result must be dynamic, or volatile, so by pressing F9 result in the function recalculating to produce different numbers (not having your code write out all the numbers again).
- Testing with 400+ numbers could result in an error so you can set the calculation mode to manual until all the formulas are written to the worksheet and turn off screen updating.
- Once you have the function working, write a subroutine that takes the values the user specified for min, max, likely, and total number of values, and display the specified number of random values on a new worksheet.
Thanks in advance.
2. Display the specified number of random values Instead of using Ms worksheet where the worksheet by the user. gbox and Inputbox to get information from the user, create a simple arguments needed by the Triangular function can be typed into the . Y ou could also have the values entered on the Introduction worksheet. emember to use cell Styles to indicate which cells the user can input the values. (Do no use cell Styles for results generated using code.) When you have done all the work, Protect the worksheet but allow the users to select the cells and enter values, not do anything else to the spreadsheet Once you have th e function working, write a subroutine that takes the values the user pecified for min, max, likely, and total number of values, and display the specified number of random values on a new worksheet. ake sure you check to see if the new worksheet already exists, and delete the old one if it does The results do not need column headings. . The results must be dynamic, or volatile, so that pressing F9 (Windows) results in the function recalculating to produce different numbers (not having your code write out all the numbers again) Manual recalculation on a Mac is Command+= for the entire workbook. Specifically, you will write your 'function' into the results sheet, not outputting only numbers, and not using the Worksheet Function technique. (Yes, this is a bit tricky.) Generating large amounts of values (400+) with this technique may cause Excel to * . . temporarily become unavailable as all the functions are recalculated each time the next Turn off screen updating. (this may require some research) function is written to the spreadsheet. You carn . Set the calculation mode to manual until all the formulas are writen to the worksheet Just remember to turn both back on again when done. 2. Display the specified number of random values Instead of using Ms worksheet where the worksheet by the user. gbox and Inputbox to get information from the user, create a simple arguments needed by the Triangular function can be typed into the . Y ou could also have the values entered on the Introduction worksheet. emember to use cell Styles to indicate which cells the user can input the values. (Do no use cell Styles for results generated using code.) When you have done all the work, Protect the worksheet but allow the users to select the cells and enter values, not do anything else to the spreadsheet Once you have th e function working, write a subroutine that takes the values the user pecified for min, max, likely, and total number of values, and display the specified number of random values on a new worksheet. ake sure you check to see if the new worksheet already exists, and delete the old one if it does The results do not need column headings. . The results must be dynamic, or volatile, so that pressing F9 (Windows) results in the function recalculating to produce different numbers (not having your code write out all the numbers again) Manual recalculation on a Mac is Command+= for the entire workbook. Specifically, you will write your 'function' into the results sheet, not outputting only numbers, and not using the Worksheet Function technique. (Yes, this is a bit tricky.) Generating large amounts of values (400+) with this technique may cause Excel to * . . temporarily become unavailable as all the functions are recalculated each time the next Turn off screen updating. (this may require some research) function is written to the spreadsheet. You carn . Set the calculation mode to manual until all the formulas are writen to the worksheet Just remember to turn both back on again when doneStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started