
Excel 2007 VBA Programmer's Reference
- English
- ePUB (mobile friendly)
- Available on iOS & Android
Excel 2007 VBA Programmer's Reference
About this book
This book is aimed squarely at Excel users who want to harness the power of the VBA language in their Excel applications. At all times, the VBA language is presented in the context of Excel, not just as a general application programming language.
The Primer has been written for those who are new to VBA programming and the Excel object model. It introduces the VBA language and the features of the language that are common to all VBA applications. It explains the relationship between collections, objects, properties, methods, and events and shows how to relate these concepts to Excel through its object model. It also shows how to use the Visual Basic Editor and its multitude of tools, including how to obtain help.
The middle section of the book takes the key objects in Excel and shows, through many practical examples, how to go about working with those objects. The techniques presented have been developed through the exchange of ideas of many talented Excel VBA programmers over many years and show the best way to gain access to workbooks, worksheets, charts, ranges, and so on. The emphasis is on efficiencyâthat is, how to write code that is readable and easy to maintain and that runs at maximum speed. In addition, the chapters devoted to accessing external databases detail techniques for accessing data in a range of formats.
The final four chapters of the book address the following advanced issues: linking Excel to the Internet, writing code for international compatibility, programming the Visual Basic Editor, and how to use the functions in the Win32 API (Windows 32-bit Application Programming Interface).
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Information
- The Excel macro recorder
- User-defined functions
- The Excel object model
- VBA programming concepts
- First, think about how you are going to carry out this operation. In this case, it is easyâyou will just type the data across the worksheet. Remember, a more complex macro might need more rehearsals before you are ready to record it.
- Next, think about when you want to start recording. In this case, you should include the selection of cell B1 in the recording, because you want to always have Jan in B1. If you donât select B1 at the start, you will record typing Jan into the active cell, which could be anywhere when you play back the macro.
- Next, think about when you want to stop recording. You might first want to include some formatting such as making the cells bold and italic, so you should include that in the recording. Where do you want the active cell to be after the macro runs? Do you want it to be in the same cell as Jun, or would you rather have the active cell in column A or column B, ready for your next input? Assume that you want the active cell to be A2, at the completion of the macro, so you will select A2 before turning off the recorder.
- Now you can set up your screen, ready to record.
Table of contents
- Cover
- Chapter 1: Primer in Excel VBA
- Chapter 2: The Application Object
- Chapter 3: Workbooks and Worksheets
- Chapter 4: Using Ranges
- Chapter 5: Using Names
- Chapter 6: Data Lists
- Chapter 7: PivotTables
- Chapter 8: Charts
- Chapter 9: Event Procedures
- Chapter 10: Adding Controls
- Chapter 11: Text Files and File Dialog
- Chapter 12: Working with XML and the Open XML File Formats
- Chapter 13: UserForms
- Chapter 14: RibbonX
- Chapter 15: Command Bars
- Chapter 16: Class Modules
- Chapter 17: Add-ins
- Chapter 18: Data Lists
- Chapter 19: Interacting with Other Office Applications
- Chapter 20: Workbooks and Worksheets
- Chapter 21: Managing External Data
- Chapter 22: The Trust Center and Document Security
- Chapter 23: Browsing OLAP Data Sources with Excel
- Chapter 24: Excel and the Internet
- Chapter 26: Programming the VBE
- Chapter 27: Programming with the Windows API
- Appendix A: Excel 2007 Object Model
- Appendix B: VBE Object Model
- Appendix C: Office 2007 Object Model
- Advertisement
- Introduction