TAILIEUCHUNG - Excel 2002 Power Programming with VBA phần 3

Excel có thể được bắt đầu nhiều cách khác nhau (tùy thuộc vào cách nó được cài đặt). Tất cả các phương pháp cuối cùng là thực thi các tập tin thực thi . Khi Excel bắt đầu, nó đọc các thiết lập của nó từ Windows Registry và mở ra bất kỳ add-in được cài đặt (có nghĩa là, những người được kiểm tra trong hộp thoại Add-Ins). | Chapter 7 Introducing Visual Basic for Applications 159 Table 7-2 Methods of a Comment Object Method Description Delete Deletes a comment. Next Returns a Comment object that represents the next comment. Previous Returns a Comment object that represents the previous comment. Text Returns or sets the text in a comment takes three arguments . Note You may be surprised to see that Text is a method rather than a property. This leads to an important point The distinction between properties and methods isn t always clear-cut and the object model isn t perfectly consistent. In fact it s not really important that you distinguish between properties and methods. As long as you get the syntax correct it doesn t matter if a word in your code is a property or a method. The Comments collection Recall that a collection is a group of like objects. Every worksheet has a Comments collection which consists of all Comment objects on the worksheet. If the worksheet has no comments this collection is empty. For example the following code refers to the first comment on Sheet1 of the active workbook Worksheets Sheet1 .Comments 1 The following statement displays the text contained in the first comment on Sheet1 MsgBox Worksheets Sheet1 .Comments 1 .Text Unlike most objects a Comment object does not have a Name property. Therefore to refer to a specific comment you must use an index number or use the Comment property of a Range object to return a specific comment keep reading and this will make sense . The Comments collection is also an object and has its own set of properties and methods. For example the following example shows the total number of comments MsgBox 160 Part III Understanding Visual Basic for Applications The Comments collection here has a Count property that stores the number of Comment objects in the active worksheet. The next example shows the address of the cell that has the first comment MsgBox 1 . Here .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.