BECOME AWESOME IN VBA TOO - Chandoo.orgimg.chandoo.org/vba/introduction to programming-part1.pdf ·...

Post on 09-May-2020

6 views 0 download

Transcript of BECOME AWESOME IN VBA TOO - Chandoo.orgimg.chandoo.org/vba/introduction to programming-part1.pdf ·...

| Chandoo.org - 2011

Introduction to Programming

B E C O M E AW E S O M E I N V B A T O O

| Chandoo.org - 2011

What is in this ?

• Computer Is our Secretary!

• Programming Concepts

• Programming Lingo

• Tips for Getting your Fingers Dirty

| Chandoo.org - 2011

What is Programming?

A computer program is

a sequence of instructions

written to perform a specified task

for a computer.

Source: http://en.wikipedia.org/wiki/Computer_program

| Chandoo.org - 2011

Computer IS our secretary

| Chandoo.org - 2011

And there is no gender bias And there is no gender bias…

Source: http://backseatcuddler.com/wp-content/uploads/2009/05/george_clooney_01.jpg

| Chandoo.org - 2011

Hello World Program

Sub helloWorld()

Debug.Print "Hello World"

End Sub

| Chandoo.org - 2011

More Hello Worlds

Sub helloWorld2()

MsgBox "I am a pretty little box!", vbOKOnly, "Hello World"

End Sub

Sub helloWorld3()

ActiveCell.Value = "Hello World!"

End Sub

| Chandoo.org - 2011

Programming Concepts

• Variables

• Operators

• Conditions

• Loops

• Exception Handling

• Modularization

• Commenting, Documentation, Help

• Forms, Buttons & Graphical Elements

| Chandoo.org - 2011

Variables

Little boxes where computer keeps the data

while doing the work

| Chandoo.org - 2011

Operators

+ - / * = < > ! . @ % ^ | ( ) { } [ ] ; :

| Chandoo.org - 2011

Conditions

IF then ELSE

SELECT

AND OR NOT

| Chandoo.org - 2011

LOOPS

FOR

WHILE

GOTO

| Chandoo.org - 2011

Exception Handling

On Error Play “Oops!... I did it again”

Something else..

Something else..

Source: Deja Britney

| Chandoo.org - 2011

Modularization

A car is not really a car,

It is thousands of parts carefully

put together

So is any computer program

It is made up of other smaller

computer programs

| Chandoo.org - 2011

Commenting, Documentation etc.

• Pieces of code that we write to tell ourselves

what is going on

• Computers ignore comments

| Chandoo.org - 2011

Graphical Elements

Buttons

Radio Buttons

Option Buttons

Combo Boxes

Tabs

Scrollbars

Images

So much more…

| Chandoo.org - 2011

Programming Concepts - recap

• Variables

• Operators

• Conditions

• Loops

• Exception Handling

• Modularization

• Commenting, Documentation, Help

• Forms, Buttons & Graphical Elements

| Chandoo.org - 2011

Join our VBA Class for more…,

http://chandoo.org/wp/vba-classes/

| Chandoo.org - 2011

Thank you

http://chandoo.org/wp/vba-classes/

http://vbaclasses.com/learn/