Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Download
Standard view
Full view
of .
Add note
Save to My Library
Sync to mobile
Look up keyword or section
Like this
0Activity
×

Table Of Contents

Overview
ANTICIPATED USER SKILL REQUIREMENTS
COPYRIGHT ACKNOWLEDGMENTS
What is VBA?
VBA: AN EVENT DRIVEN LANGUAGE
VBA: AN OBJECT-BASED LANGUAGE
The Excel VBA IDE
Figure 1 Excel VBA IDE - No Code Module Displayed
GETTING TO THE VBA IDE
Figure 2 Open the VBE from the Excel Tools Menu
Figure 3 Excel VBA IDE Major Areas
Figure 4 The VBE [View] Menu Item Expanded
TO BE EXPLICIT OR NOT
Figure 5 Option Explicit in Effect
Figure 6 Setting Option Explicit Directive: Step 1
Types of Code Modules
GENERAL PURPOSE CODE MODULES
Figure 8 Insert a New General Purpose Code Module
Figure 9 VBAProject Showing the Modules Collection
Workbook Events
Figure 10 Working in the Workbook Code Module
Worksheet Events
Figure 11 Viewing the Worksheet Event List
The ‘Target’ and ‘Cancel’ Objects
CLASS AND USERFORM MODULES
Class Modules
UserForms and their Modules
Procedures: Function and Sub
FUNCTIONS
SUBS
PROCEDURES: PUBLIC OR PRIVATE
Constants, Variables and Typing
DATA TYPES
OUR FIRST PROCEDURE
Figure 12 The VBE Debug Menu
Figure 13 MyFirstProcedure Results
RESERVED WORDS
COMMENTS AND REMARKS
ERROR HANDLING: A BEGINNING
Figure 14 BOOM! Unhandled Errors Are a Pain
CONSTANT AND VARIABLE DECLARATIONS REVISITED
Procedure Level Scope
Module Level Scope
FOR … NEXT LOOPS
FOR EACH LOOPS
Figure 15 For...Next Loop Counting Results
DO... LOOPS
DO LOOPS CONTROL SUMMARY
Decision Makers
IF...THEN
IF...THEN...ELSE
IF...THEN...ELSEIF...ELSE
SELECT CASE
Data Sources
DATA FROM WORKSHEETS: INTRO
DATA FROM EXTERNAL SOURCES
USER PROVIDED DATA
INPUT USING INPUTBOX$()
Figure 16 InputBox$() Example
Figure 17 InputBox$() Validation Failed Message
USING MSGBOX$ AS USER INPUT
Figure 18 Plain Vanilla MsgBox$() Displayed
Figure 19 MsgBox Used to Obtain User Input
USERFORM AS A DATA SOURCE
Figure 20 Multi-Control UserForm
Figure 21 UserForm With Text Entry Boxes
Project 1: Copy Between Workbooks
DATA FROM TEXT FILES: A STUDY
Project 2: Importing Data from a Text file
Programming With Excel Objects
ADVANTAGES OF USING OBJECT REFERENCES
PERFORMANCE IMPROVEMENTS USING OBJECT REFERENCES
THE EXCEL OBJECT MODEL AS A REFERENCE
Programming with Named Ranges
DEFINING A NAME
Naming Directly on a Worksheet
Naming With the Name Manager
Figure 22 - Define Name Dialog: Excel 2003
Figure 23 Name Manager: Excel 2010
Using a Named Range for a List
Code Snippets and Examples
SORTING A RANGE
FIND THE LAST USED CELL IN A COLUMN
Identify the Last Used Row
Identify the Next Available Row
FIND THE FIRST EMPTY CELL IN A COLUMN
GET THE ADDRESS INSTEAD OF THE ROW
FIND THE LAST USED CELL IN A ROW
CONSOLIDATING DATA IN A WORKBOOK
USING A TEXTBOX TO ACCESS A MACRO
DOING THE IMPOSSIBLE
Hiding Rows
Unhiding Rows
An Introduction to Debugging
THE PROBLEM EXAMPLE
Additional Excel VBA Resources
Excel MVP Websites
RON DEBRUIN’S EXCEL TIPS:
DEBRA DALGLEISH’S EXCEL TIPS
WWW.CONTEXTURES.COM
HTTP://WWW.CONTEXTURES.COM/TIPTECH.H TML
F (CONT'D)
CHIP PEARSON’S EXCEL TIPS:
OZGRIDS FORMULAS W/DOWNLOADS:
JON PELTIER’S CHART TUTORIALS
CHARLES WILLIAMS DECISIONMODELS.COM SITE
TOOLS AND DOWNLOADS BY JAN KAREL PIETERSE
JOHN WALKENBACH FREE EXCEL TIPS
General
Formatting
Formulas
Charts & Graphics
Printing
Developer Tips by Category
General VBA
CommandBars & Menus
UserForms
VBA Functions
0 of .
Results for:
No results containing your search query
P. 1
ProgrammingInExcelVBA_AnIntroduction

ProgrammingInExcelVBA_AnIntroduction

Ratings: (0)|Views: 444|Likes:
Published by madhav_karki_2
VBA Excel 2007
VBA Excel 2007

More info:

Published by: madhav_karki_2 on Jun 29, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See More
See less

06/29/2013

pdf

text

original

You're Reading a Free Preview
Pages 4 to 25 are not shown in this preview.
You're Reading a Free Preview
Pages 29 to 44 are not shown in this preview.
You're Reading a Free Preview
Pages 48 to 95 are not shown in this preview.

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->