Excel 2007 VBA Programmer's Reference
John Green, Stephen Bullen, Rob Bovey, Michael Alexander
- English
- ePUB (adapté aux mobiles)
- Disponible sur iOS et Android
Excel 2007 VBA Programmer's Reference
John Green, Stephen Bullen, Rob Bovey, Michael Alexander
Ă propos de ce livre
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).
Foire aux questions
Informations
- 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.