QuanTriExcel.info xin gửi tặng các bạn bộ tài liệu quý + hiếm " />
RaoVat24h
Office Word

Tài liệu hay – Lập trình Macro VBA cho Excel 2010 – full 41 chuyên đề & 318 trang

Advertisement

QuanTriExcel.info xin gửi tặng các bạn bộ tài liệu quý + hiếm và mới nhất mà chúng tôi mới sưu tầm: Lập trình Macro VBA cho Excel 2010 – full 41 chuyên đề & 318 trang

Link tải full bộ tài liệu : Tại đây


Introduction
Overview
Spreadsheet macro programming has changed enormously within the last 12 years, when we went
from text-based macros to VBA. There was also a major change in Office 97, when macros went to
VBA worksheet modules in a separate environment accessed via the Visual Basic Editor. It used to
be fairly basic: code was entered onto a specially designated worksheet. Although the language
was powerful in its own right, it was not a structured language and could certainly not be described
as Object-Oriented. The number of commands was limited and a fair amount of ingenuity was
required to do certain tasks. The main advantage of it was that it was easy to learn and
understand; many programmers cut their teeth initially by writing spreadsheet macros.
However, it was also quite difficult to document and for other programmers to understand, since
code could be placed anywhere on the macro spreadsheet, and blocks of code were only defined
by a range name. This meant that code could be all over the place and following the flow of the
program around the macro spreadsheet could become very complicated. Of course, professional
developers could comment their code by using a cell to the right and could organize their code and
its placement on the worksheet. However, it was still a complicated and unstructured process. If
anyone other than the original author examined the code, it could take days to find out exactly how
it worked and what it was doing. Commercial companies frequently found that when the author of a
complicated macro left the company, that macro had to be rewritten from scratch because of the
time involved in assessing what it was doing.
Since the advent of Excel 5.0, Microsoft has introduced a new programming language called Visual
Basic for Applications (VBA). VBA is a more intuitive and robust programming language using an
object-oriented design. It has a great deal of similarity with its older and larger cousin, Visual Basic
(VB). Once you learn VBA, you will have a fair understanding of how Visual Basic itself operates.
VBA is extremely different from the old macro language—if the older language is what you are
used to, it will involve a total rethinking of how you write and structure your code. The concepts of
Object Orientated Programming (OOP) are as different as chalk and cheese to the old macro
language, but there is a huge advantage in terms of what you can achieve on a spreadsheet. With
Object Orientated Programming you are dealing with the concept of objects. To use an example,
the workbook you load is an object. The worksheet where you enter your data is another object.
The command bar (menu) across the top is the printer and the screen. All have properties, events,
and methods (discussed later in the book). You will start to see Object Oriented Programming in
more detail when you reach Chapter 12 (“The Excel Object Model”).
VBA does allow a more structured and object-orientated approach to writing your macros. If this is
your first foray into the world of Excel macro programming, you may well find the concepts easier to
grasp, since you have no knowledge of the technologies used in the past within Excel. The text-
based macros were a completely different language in terms of how and where you entered it. The
concept of VBA is unique and cannot be compared to text-based macros. Unfortunately,
knowledge of the old system of writing macros can add to confusion with the new method of VBA
and extend the learning curve.
Since VBA is shared by all Office Applications, a great deal of the information contained in this
book will help you with other Office Applications such as Word or Access and also with Visual Basic
itself. VBA is more powerful then the previous text macro language and enables you to extend
Excel in any way you choose. It allows you to write code to do things not within the Excel menu
structure. It even provides the means to access and manipulate other Microsoft Office Applications
under software control. For example, by using the Outlook object model you could copy address
lists onto your spreadsheet merely by executing VBA code. This would happen even if Outlook

Link tải full bộ tài liệu : Tại đây

?DienDan.Edu.Vn cám ơn bạn đã quan tâm và rất vui vì bài viết đã đem lại thông tin hữu ích cho bạn. https://diendan.edu.vn/
?Các bạn tham khảo hướng dẫn tải file trên Quản Trị Excel tại đây: http://www.quantriexcel.info/2018/11/huong-dan-tai-file-tren-quan-tri-excel.html

Rate this post

DienDan.Edu.Vn

DienDan.Edu.Vn Cám ơn bạn đã quan tâm và rất vui vì bài viết đã đem lại thông tin hữu ích cho bạn.
DienDan.Edu.Vn! là một website với tiêu chí chia sẻ thông tin,... Bạn có thể nhận xét, bổ sung hay yêu cầu hướng dẫn liên quan đến bài viết. Vậy nên đề nghị các bạn cũng không quảng cáo trong comment này ngoại trừ trong chính phần tên của bạn.
Cám ơn.

Đăng bình luận

(+84) (901) 369.468