Đang chuẩn bị liên kết để tải về tài liệu:
Mastering Excel 2003 Programming with VBA phần 4

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Bạn có thể áp dụng nhiều kỹ thuật khác nhau để di chuyển xung quanh một bảng tính. Tôi sẽ trình bày một vài ở đây mà tôi đã sử dụng thành công cho nhiều mục đích khác nhau. Có hai cách chính để di chuyển về một tờ làm việc đang sử dụng tài sản tế bào của đối tượng Worksheet và tài sản Offset của đối tượng Range. | 164 chapter 8 the most important object You can apply many different techniques for moving around a worksheet. I ll present a few here that I ve used successfully for many different purposes. The two primary ways to move about a worksheet are using the Cells property of the Worksheet object and the Offset property of the Range object. I ve already talked about the Cells property earlier in the chapter see Listing 8.2 so let s take a look at the Offset property. Offset Is for Relative Navigation You can use the Offset property of the Range object to refer to ranges on a worksheet based on or relative to another range. This property provides you with a great deal of flexibility for moving around a worksheet. One thing that you can do with Offset is process a structured list. By structured list I mean a list of items on a worksheet in which you know the order or structure of the columns ahead of time. Consider the list of items shown in Figure 8.8. One way you could process this list is by setting a reference to the first column of the first row in the list. Then you could loop through the list advancing your reference down a row and terminating the loop when you reach an empty row assuming you know that there won t be any empty rows within the boundaries of your list . As you loop through the list you could investigate columns of interest by using the Offset property. Listing 8.6 demonstrates how you could filter this list. You ll have to bear with me and pretend that Excel doesn t have any native filtering functionality which we ll examine in the next chapter . Anyway Listing 8.6 uses the Offset property to process the list shown in Figure 8.8 so that it hides any rows that contain cars from the 20th century. Further this process highlights the mileage column if the car has less than 40 000 miles. FIGURE 8.8 A simple worksheet list finding my way 165 Listing 8.6 LIST PROCESSING WITH THE Offset Property Sub ListExample FilterYear 2000 End Sub Sub Reset With .

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.