14
Generating Data for Assignment 9

Generating Data for Assignment 9. Macro security policies Excel contains a programming language called Visual Basic for Applications that can be used

Embed Size (px)

Citation preview

Page 1: Generating Data for Assignment 9. Macro security policies Excel contains a programming language called Visual Basic for Applications that can be used

Generating Data for Assignment 9

Page 2: Generating Data for Assignment 9. Macro security policies Excel contains a programming language called Visual Basic for Applications that can be used

Macro security policies

Excel contains a programming language called Visual Basic for Applications that can be used to create macros and computer programs.

Since the writing macros is one of the strategies that hackers use to disrupt computers, Microsoft has built security into Excel that lets you determine whether or not an Excel macro can run on your computer.

At the highest levels of security (High and Very High), only macros from trusted sources are permitted to run. This is the default level set by Microsoft when you install Excel and it will prevent you from using Assignment9_Starter.xls to generate data.

The next level of security is called medium and is the level that we will set. At this level, Excel will prompt you with a message box anytime it finds a macro in a workbook it is trying to open. If it is a workbook that you know contains a macro you need, click on the Enable Macros button. If you are not sure who created the macro or what their intention is, you should Disable Macros to prevent them from running. The workbook will usually open, but the macros cannot do anything.

The lowest level of security is called low and should not be used as it allows macros to run without any notification to you.

Generating Data for Assignment 9, Slide 2 Copyright © 2003, Jim Schwab, University of Texas at Austin

Page 3: Generating Data for Assignment 9. Macro security policies Excel contains a programming language called Visual Basic for Applications that can be used

Access macro security

Generating Data for Assignment 9, Slide 3 Copyright © 2004, Jim Schwab, University of Texas at Austin

The workbook Assignment9_Starter.xls contains an Excel macro that generates the data. In order to use this workbook, the security level for macros must be changed from the Excel default of High to Medium.

The workbook Assignment9_Starter.xls contains an Excel macro that generates the data. In order to use this workbook, the security level for macros must be changed from the Excel default of High to Medium.

To change the macro security level, select Macro > Security from the Tools menu.

To change the macro security level, select Macro > Security from the Tools menu.

Page 4: Generating Data for Assignment 9. Macro security policies Excel contains a programming language called Visual Basic for Applications that can be used

Set macro security

Generating Data for Assignment 9, Slide 4 Copyright © 2004, Jim Schwab, University of Texas at Austin

First, click on the Security Level tab to access that page.

First, click on the Security Level tab to access that page.

Second, mark the Medium option button to set the security level. This level will present you with a dialog box any time a worksheet contains a macro to let you decide what is safe to open.

Second, mark the Medium option button to set the security level. This level will present you with a dialog box any time a worksheet contains a macro to let you decide what is safe to open.

Third, click on the OK button to set the security level.

Third, click on the OK button to set the security level.

Page 5: Generating Data for Assignment 9. Macro security policies Excel contains a programming language called Visual Basic for Applications that can be used

Open the Assignment9_Starter.xls workbook

Generating Data for Assignment 9, Slide 5 Copyright © 2004, Jim Schwab, University of Texas at Austin

First, select the Open command from the File menu.

First, select the Open command from the File menu.

Page 6: Generating Data for Assignment 9. Macro security policies Excel contains a programming language called Visual Basic for Applications that can be used

Open the Assignment9_Starter.xls workbook

Generating Data for Assignment 9, Slide 6 Copyright © 2004, Jim Schwab, University of Texas at Austin

First, navigate to the folder where we downloaded Assignment9_Starter.xls.

First, navigate to the folder where we downloaded Assignment9_Starter.xls.

Second, type the name of the file Assignment9_Start.xls that we want to open.

Second, type the name of the file Assignment9_Start.xls that we want to open.

Page 7: Generating Data for Assignment 9. Macro security policies Excel contains a programming language called Visual Basic for Applications that can be used

Enable macros in the workbook to be opened

Generating Data for Assignment 9, Slide 7 Copyright © 2004, Jim Schwab, University of Texas at Austin

When the workbook contains a macro, you will be given a choice to Enable Macros or Disable Macros.

When the workbook contains a macro, you will be given a choice to Enable Macros or Disable Macros.

Click on the Enable Macros button.

Click on the Enable Macros button.

Page 8: Generating Data for Assignment 9. Macro security policies Excel contains a programming language called Visual Basic for Applications that can be used

The Assignment9_Starter.xls workbook

Generating Data for Assignment 9, Slide 8 Copyright © 2004, Jim Schwab, University of Texas at Austin

The Assignment9_Starter.xls workbook requires you to enter for items: your Eid, the number of time periods for which you want to generate data, the number of potential clients in the first time period, and an estimate of the annual rate of growth, e.g. 5% or 10% or some other percentage.

I have added some protection to the worksheet so that you can only enter data in the four cells for EID, time periods, potential clients, and rate of change.

The Assignment9_Starter.xls workbook requires you to enter for items: your Eid, the number of time periods for which you want to generate data, the number of potential clients in the first time period, and an estimate of the annual rate of growth, e.g. 5% or 10% or some other percentage.

I have added some protection to the worksheet so that you can only enter data in the four cells for EID, time periods, potential clients, and rate of change.

Page 9: Generating Data for Assignment 9. Macro security policies Excel contains a programming language called Visual Basic for Applications that can be used

Entering your EID

Generating Data for Assignment 9, Slide 9 Copyright © 2004, Jim Schwab, University of Texas at Austin

The macro in this workbook will generate a random sequence of numbers for the time periods you indicate.

The macro uses your eid as a starting point in the process of generating random numbers to make certain that each person gets a different set of numbers, and to make certain that you will get the same sequence more than once in case you accidentally delete your data.

The macro in this workbook will generate a random sequence of numbers for the time periods you indicate.

The macro uses your eid as a starting point in the process of generating random numbers to make certain that each person gets a different set of numbers, and to make certain that you will get the same sequence more than once in case you accidentally delete your data.

Page 10: Generating Data for Assignment 9. Macro security policies Excel contains a programming language called Visual Basic for Applications that can be used

The number of time periods

Generating Data for Assignment 9, Slide 10 Copyright © 2004, Jim Schwab, University of Texas at Austin

You can choose the number of historical time periods for which you want data. The macro will require that you pick at least 10.

You can choose the number of historical time periods for which you want data. The macro will require that you pick at least 10.

Page 11: Generating Data for Assignment 9. Macro security policies Excel contains a programming language called Visual Basic for Applications that can be used

The number of potential clients

Generating Data for Assignment 9, Slide 11 Copyright © 2004, Jim Schwab, University of Texas at Austin

This is the number of potential clients who might use your agency's services, not the number of actual clients served in a year.

If my hypothetical home were serving children in Central Texas, I might estimate the potential client pool at 300,000.

I found some information on the Internet in coming up with this estimate.

This is the number of potential clients who might use your agency's services, not the number of actual clients served in a year.

If my hypothetical home were serving children in Central Texas, I might estimate the potential client pool at 300,000.

I found some information on the Internet in coming up with this estimate.

Page 12: Generating Data for Assignment 9. Macro security policies Excel contains a programming language called Visual Basic for Applications that can be used

The estimated rate of change

Generating Data for Assignment 9, Slide 12 Copyright © 2004, Jim Schwab, University of Texas at Austin

From the same data source that suggested there were 300,000 children in Central Texas, I obtained an estimated rate of change of 44% over 5 years, which I rounded to 8% per year.

From the same data source that suggested there were 300,000 children in Central Texas, I obtained an estimated rate of change of 44% over 5 years, which I rounded to 8% per year.

To obtain the data, click on the Generate data button. When the computer is finished generating data, it will go to the AnalyzeData worksheet and show your data.

To obtain the data, click on the Generate data button. When the computer is finished generating data, it will go to the AnalyzeData worksheet and show your data.

Page 13: Generating Data for Assignment 9. Macro security policies Excel contains a programming language called Visual Basic for Applications that can be used

The data

Generating Data for Assignment 9, Slide 13 Copyright © 2004, Jim Schwab, University of Texas at Austin

The data for your chart and forecast will appear on the AnalyzeData worksheet.

Save the workbook before proceding with your analysis.

The data for your chart and forecast will appear on the AnalyzeData worksheet.

Save the workbook before proceding with your analysis.

Page 14: Generating Data for Assignment 9. Macro security policies Excel contains a programming language called Visual Basic for Applications that can be used

My completed assignment

Generating Data for Assignment 9, Slide 14 Copyright © 2004, Jim Schwab, University of Texas at Austin