Читать книгу Beginning Programming All-in-One For Dummies - Wallace Wang - Страница 74

Customizing a program

Оглавление

Besides letting you automate a program, scripting languages also let you customize a program, which can make the program easier to use. For example, you may have a spreadsheet that calculates your company’s invoices. However, to use this spreadsheet, you need to know the specific place in the spreadsheet to type new invoice information. Type this information in the wrong place, and the spreadsheet doesn’t work right.

To avoid this problem, you can write a program in a scripting language that can display a window with boxes to type in new invoice information. Then the scripting language program automatically plugs that new information in the correct place in the spreadsheet every time.

For even more power, a scripting language can combine automation with customization to make programs perform tasks on their own. By using VBA in Microsoft Office, you could write a VBA program that tells your computer to copy data from an Excel spreadsheet, paste it into a Word document at a specific time each day, and then save your document.

Beginning Programming All-in-One For Dummies

Подняться наверх