Excel 2019 Bible

(singke) #1

xxxviii


Contents


Label ........................................................................................................ 992
ListBox ..................................................................................................... 993
OptionButton ............................................................................................ 993
ScrollBar ................................................................................................... 994
SpinButton ............................................................................................... 995
TextBox .................................................................................................... 995
ToggleButton ............................................................................................ 996

Chapter 46: Working with Excel Events. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  997
Understanding Events ........................................................................................ 997
Entering Event-Handler VBA Code........................................................................ 998
Using Workbook-Level Events .............................................................................. 999
Using the Open event .............................................................................. 1000
Using the SheetActivate event ................................................................. 1001
Using the NewSheet event ........................................................................ 1002
Using the BeforeSave event ...................................................................... 1002
Using the BeforeClose event ..................................................................... 1002
Working with Worksheet Events ........................................................................ 1003
Using the Change event ........................................................................... 1003
Monitoring a specific range for changes .................................................... 1004
Using the SelectionChange event .............................................................. 1005
Using the BeforeRightClick event ............................................................. 1006
Using Special Application Events ....................................................................... 1006
Using the OnTime event ........................................................................... 1007
Using the OnKey event ............................................................................ 1008

Chapter 47: Seeing Some VBA Examples  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1011
Working with Ranges ....................................................................................... 1011
Copying a range ...................................................................................... 1012
Copying a variable-size range ................................................................... 1013
Selecting to the end of a row or column .................................................... 1014
Selecting a row or column ........................................................................ 1014
Moving a range ....................................................................................... 1015
Looping through a range efficiently .......................................................... 1015
Prompting for a cell value ........................................................................ 1016
Determining the type of selection ............................................................ 1018
Identifying a multiple selection ............................................................... 1018
Counting selected cells ............................................................................ 1019
Working with Workbooks .................................................................................. 1020
Saving all workbooks ............................................................................... 1020
Saving and closing all workbooks .............................................................. 1020
Working with Charts ........................................................................................ 1021
Modifying the chart type ......................................................................... 1021
Modifying chart properties ...................................................................... 1022
Applying chart formatting ....................................................................... 1022
Free download pdf