Key Points


  • Add a custom command button to a worksheet to provide an easy way to launch a macro. Give the button a meaningful name before you create an event handler for it.

  • Assign a MouseMove event handler to a control to get extremely frequent events that don’t even require a click. Use the Shift argument of the MouseMove event to fine-tune the behavior of the event handler.

  • If you want a worksheet event handler to run for any worksheet in the workbook- including new worksheets-create the event handler at the workbook level.

  • Any event handler that begins with the word Before can be cancelled. Just add the statement Cancel=True to the body of the event handler to block what Excel would otherwise automatically do with that event.



Microsoft Office Excel 2007 Visual Basic for Applications Step by Step
Microsoft Excel 2002 Visual Basic for Applications Step by Step (Step by Step (Microsoft))
ISBN: 0735613591
EAN: 2147483647
Year: 2004
Pages: 99
Authors: Reed Jacobsen

Similar book on Amazon
Excel 2003 Power Programming with VBA (Book & CD-ROM)
Excel 2003 Power Programming with VBA (Book & CD-ROM)
Microsoftu00ae Office Excelu00ae 2007 Visual Basicu00ae for Applications Step by Step (BPG-step by Step)
Microsoftu00ae Office Excelu00ae 2007 Visual Basicu00ae for Applications Step by Step (BPG-step by Step)
Excel 2003 Formulas
Excel 2003 Formulas
Writing Excel Macros with VBA, 2nd Edition
Writing Excel Macros with VBA, 2nd Edition

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net