TAILIEUCHUNG - Microsoft Excel VBA Programming for the Absolute Beginner Second Edition phần 9

Trong thủ tục con AddChartSheet (), một đối tượng Axis cụ thể được trả về từ các đối tượng Axes bộ sưu tập bằng cách đi qua một hằng số được xác định với Axes () phương pháp. Phương pháp Axes () trả về một đối tượng Axis và chiếm VBA UserForms và điều khiển bổ sung | Chapter 9 Excel Charts .Axes xlCategory .MinorTickMark xlOutside .Axes xlValue .MinorTickMark xlOutside ----------------------------- Use Excel worksheet function to set the maximum scale on the value axis. ----------------------------- .Axes xlValue .MaximumScale . _ RoundUp . _ Max dataRange -1 .Axes xlCategory .HasTitle True .Axes xlCategory . X-axis Labels .Axes xlValue .HasTitle True .Axes xlValue . Y-axis .SeriesCollection 1 .Name Sample Data .SeriesCollection 1 .Values dataRange End With End Sub In the AddChartSheet sub procedure a specific Axis object is returned from the Axes collection object by passing a defined constant with the Axes method. The Axes method returns an Axis object and takes up to two parameters one for the axis type xlCategory xlSeries or xlValue and another for the axis group xlPrimary or xlSecondary . The axis type xlCategory represents the x-axis on the chart and xlValue represents the y-axis. The axis type xlSeries applies only to 3D charts and represents the z-axis. The axis group is either xlPrimary default or xlSecondary applies to charts containing multiple Series objects . The rest of the objects and properties set via the Axis object are fairly straightforward and include setting tick marks and chart labels. The upper limit of the y-axis scale is set using Excel worksheet functions that return the maximum value from the variable dataRange defined at the beginning of the procedure rounded up to single-digit precision. The data is finally added to the chart by setting the Values property of the Series object returned from the SeriesCollection collection object with the range variable dataRange. Figure shows the components specifically added to the chart by the preceding code. The chart also contains components created from default properties of the various chart related objects. For example the gridlines in the figure .

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.