Excel 2010 Bible

(National Geographic (Little) Kids) #1

xxxiii


Contents


Rank and Percentile.................................................................................................790
Regression ...............................................................................................................790
Sampling .................................................................................................................791
t-Test.......................................................................................................................792
z-Test (two-sample test for means) .........................................................................792

Part VI: Programming Excel with VBA 793


Chapter 39: Introducing Visual Basic for Applications  . . . . . . . . . . . . . . 795
Introducing VBA Macros ...................................................................................................795
Displaying the Developer Tab ...........................................................................................796
About Macro Security .......................................................................................................797
Saving Workbooks That Contain Macros ..........................................................................798
Two Types of VBA Macros ................................................................................................799
VBA Sub procedures ...............................................................................................799
VBA functions .........................................................................................................800
Creating VBA Macros ........................................................................................................802
Recording VBA macros ............................................................................................802
Recording your actions to create VBA code: The basics ..................................802
Recording a macro: A simple example ...........................................................803
Examining the macro ....................................................................................804
Testing the macro ..........................................................................................805
Editing the macro ..........................................................................................805
Another example ...........................................................................................806
Running the macro ........................................................................................806
Examining the macro ....................................................................................806
Re-recording the macro .................................................................................807
Testing the macro ..........................................................................................808
More about recording VBA macros ..........................................................................808
Absolute versus relative recording .................................................................808
Storing macros in your Personal Macro Workbook ........................................809
Assigning a macro to a shortcut key ..............................................................810
Assigning a macro to a button .......................................................................810
Writing VBA code ...................................................................................................811
The basics: Entering and editing code............................................................812
How VBA works ............................................................................................812
Objects and collections ..................................................................................814
Properties ......................................................................................................815
Methods ........................................................................................................817
Variables ........................................................................................................817
Controlling execution ....................................................................................818
A macro that can’t be recorded ......................................................................819
Learning More ..................................................................................................................821

02_474877-ftoc.indd xxxiii02_474877-ftoc.indd xxxiii 3/29/10 11:34 PM3/29/10 11:34 PM

Free download pdf