TAILIEUCHUNG - Mastering Excel 2003 Programming with VBA phần 2

Bây giờ chúng ta hãy nhìn vào mô hình phát triển (các ngôn ngữ lập trình và máy chủ ứng dụng cho phép bạn thủ công các trang động), sự khác biệt giữa chúng, và những gì có thể là môi trường tốt nhất cho bạn để sử dụng. Lựa chọn một mô hình phát triển | 42 chapter 3 getting started with VBA TABLE Data Types DATA TYPE RANGE OF VALUES MEMORY usage Boolean True or False. 2 bytes Byte 0-255. 1 byte Currency -922 337 203 685 to 922 337 203 685 . 8 bytes Date 1 January 100 to 31 December 9999 and times from 0 00 00 to 23 59 59. 8 bytes Decimal With no decimal places the largest possible value is 79 228 162 514 264 337 593 543 950 335. With 28 decimal places the largest value is . 12 bytes Double to for negative values and from to for positive values. 8 bytes Integer -32 768 to 32 767. 2 bytes Long -2 147 483 648 to 2 147 483 647. 4 bytes Object Can have any object reference assigned to it. 4 bytes Single to for negative values and from to for positive values. 4 bytes String A variable-length string can contain up to approximately 2 billion 2a31 characters. You can also declare fixed-length strings up to about 64 000 characters. Varies User Defined User-defined data types can contain one or more other data types an array or a previously defined user-defined type. Varies Variant Varies see section on variants later in this section. Varies Until you are confident with the subtleties of when to use one data type over another I d suggest that you focus on the following data types Boolean Booleans are used frequently to help implement logic in your programs. You may use them in If. .Then statements Do. .While statements and as a return type for functions. For example in Chapter 7 you ll implement a function named WorksheetExists that returns a Boolean. This function tests to see whether or not a given worksheet name exists in a workbook. Integer Integer variables are probably the most frequently used data type. You ll use integer variables in conjunction with For. .Next statements to refer to elements within an array or collection and to help

Đã 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.