Types of Tasks

You can perform several broad categories of tasks with the Visual Basic language. Since we’re talking about Visual Basic (not Excel), these tasks tend to be very general. More specific tasks are usually handled through Excel objects.

I’ve organized this chapter so the simplest tasks are first. By the end, things get pretty advanced, so if you feel overwhelmed at any point, feel free to come back later—you may just need some time to digest these concepts. Table 3-1 organizes the sections in this chapter to give you a bit of an overview .

Table 3-1. An overview of Visual Basic programming tasks

Category

Section

Overview

Users

Interact with Users

Use simple dialog boxes to get or display information.

Data

Do Math

Perform calculations.

 

Work with Text

Compose and modify strings of text.

 

Get Dates and Times

Get current dates and times and perform calculations on dates and times.

Storage

Read and Write Files

Open, read, write, and close files stored on disk.

Expressions

Check Results

Find what kind of data was returned by an operation.

 

Find Truth

Combine expressions to create complex conditions.

 

Compare Bits

Get multiple pieces of information from a single value.

Interoperate

Run Other Applications

Exchange data with other Windows applications.

Compiler

Control the Compiler

Create debug and release versions of code within the same source file.

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.