{"id":36,"date":"2024-09-15T15:34:08","date_gmt":"2024-09-15T07:34:08","guid":{"rendered":"https:\/\/lilia-study.com\/lang\/eng\/?p=36"},"modified":"2024-09-15T15:34:09","modified_gmt":"2024-09-15T07:34:09","slug":"data-type","status":"publish","type":"post","link":"https:\/\/lilia-study.com\/lang\/chs\/excel\/excel-vba\/data-type\/","title":{"rendered":"\u5982\u4f55\u4f7f\u7528 Excel VBA \u6570\u636e\u7c7b\u578b"},"content":{"rendered":"<p><!-- wp:html --><\/p>\n<p><span class=\"icon_point color01\"><\/span>&nbsp;\u672c\u6587\u7531\u65e5\u6587\u8bd1\u6210\u4e2d\u6587\u3002<\/p>\n<p><!-- \/wp:html --><\/p>\n\n\n\n\n<p>\u5728 Excel \u4e2d\u4f7f\u7528 VBA \u65f6\uff0c\u6211\u4eec\u7ecf\u5e38\u4f7f\u7528 \u201c\u53d8\u91cf\u201d\u3002<\/p>\n\n\n\n<p>\u53d8\u91cf\u6709\u5404\u79cd \u201c\u6570\u636e\u7c7b\u578b\u201d\uff0c\u5982\u6570\u5b57\u3001\u5b57\u7b26\u4e32\u3001\u65e5\u671f\u7b49\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u4f7f\u7528\u9002\u5f53\u7684\u7c7b\u578b\uff0c\u5c31\u53ef\u4ee5\u907f\u514d\u53ef\u80fd\u610f\u60f3\u4e0d\u5230\u7684\u9519\u8bef\u3002<\/p>\n\n\n<p><!-- wp:html --><\/p>\n<p style=\"margin-bottom:0;padding-bottom:0;\">&lt;&nbsp;Sponsored Links&nbsp;&gt;<\/p>\n<p><script async=\"\" src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br \/>\n<!-- lilia top --><br \/>\n<ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-4504956686889525\" data-ad-slot=\"2727563599\" data-ad-format=\"auto\" data-full-width-responsive=\"true\"><\/ins><br \/>\n<script>\n(adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><br \/>\n<!-- \/wp:html --><\/p>\n\n\n\n\n<h2 class=\"wp-block-heading\">\u6570\u636e\u7c7b\u578b<\/h2>\n\n\n\n<table style=\"table-layout:fixed;width:95%;\">\n<tbody>\n<tr>\n<td style=\"width:25%;\">Byte type<\/td>\n<td style=\"width:15%;\">Byte<\/td>\n<td style=\"width:60%;\">\u4ece 0 \u5230 255 \u7684\u6574\u6570<\/td>\n<\/tr>\n<tr>\n<td>\u5e03\u5c14\u7c7b\u578b<\/td>\n<td>Boolean<\/td>\n<td>\u771f\uff08True\uff09\u6216\u5047\uff08False\uff09<\/td>\n<\/tr>\n<tr>\n<td>\u6574\u6570\u578b<\/td>\n<td>Integer<\/td>\n<td>-32,768\u81f332,767\u6574\u6570<\/td>\n<\/tr>\n<tr>\n<td>\u957f\u6574\u578b<\/td>\n<td>Long<\/td>\n<td>-2,147,483,648\u81f32,147,483,647\u4e2a\u6574\u6570<\/td>\n<\/tr>\n<tr>\n<td>\u5355\u7cbe\u5ea6\u6d6e\u70b9\u7c7b\u578b<\/td>\n<td>Single<\/td>\n<td>-3.402823E38\u81f3-1.401298E-45\uff08\u8d1f\u503c\uff09\n<p>1.401298E-45 \u81f3 3.402823E38\uff08\u6b63\u503c\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\u53cc\u7cbe\u5ea6\u6d6e\u70b9\u578b<\/td>\n<td>Double<\/td>\n<td>-1.79769313486231E308\u81f3-4.94065645841247E-324\n<p>(\u8d1f\u503c)<br>4.94065645841247E-324\uff5e1.79769313486232E308<br>\uff08\u6b63\u503c\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\u8d27\u5e01\u7c7b\u578b<\/td>\n<td>Currency<\/td>\n<td>-922,337,203,685,477.5808 \uff5e 922,337,203,685,477.5807<\/td>\n<\/tr>\n<tr>\n<td>\u5341\u8fdb\u5236\u7c7b\u578b<\/td>\n<td>Decimal<\/td>\n<td>\u7528\u4e8e\u6ca1\u6709\u5c0f\u6570\u90e8\u5206\u7684\u6570\u5b57\u3001\n<p>-79,228,162,514,264,337,593,543,950,335 \uff5e 79,228,162,514,264,337,593,543,950,335<br>\u5bf9\u4e8e\u6709 28 \u4f4d\u5c0f\u6570\u7684\u6570\u5b57\u3001<br>-7.9228162514264337593543950335 \uff5e 7.9228162514264337593543950335<br><br>\u6700\u5c0f\u7edd\u5bf9\u503c\u662f\u4e0d\u5305\u62ec 0 \u7684\u503c\u3001<br>0.0000000000000000000000000001<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\u65e5\u671f\u7c7b\u578b<\/td>\n<td>Date<\/td>\n<td>\u516c\u5143 100 \u5e74 1 \u6708 1 \u65e5\u81f3\u516c\u5143 9999 \u5e74 12 \u6708 31 \u65e5<\/td>\n<\/tr>\n<tr>\n<td>\u5b57\u7b26\u4e32\u7c7b\u578b<\/td>\n<td>String<\/td>\n<td>0\uff5e2GB\uff08\u53d8\u957f\uff09<br>\n<p>1\uff5e2GB\uff08\u5b9a\u957f\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\u7269\u4f53\u7c7b\u578b<\/td>\n<td>Object<\/td>\n<td>\u6307\u4ee3\u5bf9\u8c61\u7684\u6570\u636e\u7c7b\u578b<\/td>\n<\/tr>\n<tr>\n<td>\u53d8\u4f53\u7c7b\u578b<\/td>\n<td>Variant<\/td>\n<td>\u4e0e\u53cc\u7cbe\u5ea6\u6d6e\u70b9\u7c7b\u578b\u8303\u56f4\u76f8\u540c\uff08\u6570\u503c\uff09\n<p>\u4e0e\u53d8\u957f\u5b57\u7b26\u4e32\u7c7b\u578b\u8303\u56f4\u76f8\u540c\uff08\u5b57\u7b26\u4e32\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\u7528\u6237\u81ea\u5b9a\u4e49\u7c7b\u578b<\/td>\n<td>&nbsp;<\/td>\n<td>\u6bcf\u4e2a\u5143\u7d20\u7684\u8303\u56f4\u4e0e\u5176\u6570\u636e\u7c7b\u578b\u7684\u8303\u56f4\u76f8\u540c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u793a\u4f8b<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b57\u8282\u7c7b\u578b\uff08Byte\uff09<\/h3>\n\n\n\n<p>\u53ef\u4ee5\u5c06 0 \u81f3 255 \u7684\u6574\u6570\u5206\u914d\u7ed9\u53d8\u91cf\u3002<\/p>\n\n\n\n<p class=\"box_style box_style04 bdr_gray\">Dim x As Byte<br>x = 255<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6574\u6570\u578b\uff08Integer\uff09<\/h3>\n\n\n\n<p>-32,768\u81f332,767\u6574\u6570\u53ef\u5206\u914d\u7ed9\u53d8\u91cf\u3002<\/p>\n\n\n\n<p class=\"box_style box_style04 bdr_gray\">Dim x As Integer<br>x = 32767<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u957f\u6574\u578b\uff08Long\uff09<\/h3>\n\n\n\n<p>-2,147,483,648\u81f32,147,483,647\u4e2a\u6574\u6570\u53ef\u5206\u914d\u7ed9\u53d8\u91cf\u3002<\/p>\n\n\n\n<p class=\"box_style box_style04 bdr_gray\">Dim x As Long<br>x = 2147483647<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5355\u7cbe\u5ea6\u6d6e\u70b9\u7c7b\u578b\uff08Single\uff09<\/h3>\n\n\n\n<p>\u5bf9\u4e8e\u6b63\u503c\uff0c\u53ef\u4ee5\u4e3a\u53d8\u91cf\u5206\u914d\u4e00\u4e2a\u5c0f\u6570\u70b9\u5728 1.401298E-45 \u548c 3.402823E38 \u4e4b\u95f4\u7684\u6570 \u503c\u3002<br>\u5bf9\u4e8e\u8d1f\u503c\uff0c\u53ef\u4ee5\u4e3a\u53d8\u91cf\u5206\u914d\u4e00\u4e2a\u5c0f\u6570\u70b9\u5728-3.402823E38 \u548c-1.401298E-45 \u4e4b\u95f4\u7684\u6570\u503c\u3002<\/p>\n\n\n\n<p class=\"box_style box_style04 bdr_gray\">Dim x As Single<br>x = 3.402823<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u53cc\u7cbe\u5ea6\u6d6e\u70b9\u578b\uff08Double\uff09<\/h3>\n\n\n\n<p>\u5bf9\u4e8e\u6b63\u503c\uff0c\u53d8\u91cf\u53ef\u4ee5\u5206\u914d\u4e00\u4e2a\u5c0f\u6570\u70b9\u5728 4.94065645841247E-324 \u548c 1.79769313486232E308 \u4e4b\u95f4\u7684\u6570\u5b57\u3002<br>\u5bf9\u4e8e\u8d1f\u503c\uff0c\u53d8\u91cf\u53ef\u4ee5\u5206\u914d\u4e00\u4e2a\u5c0f\u6570\u70b9\u5728 -1.79769313486231E308 \u548c -4.94065645841247E-324 \u4e4b\u95f4\u7684\u6570\u503c\u3002<\/p>\n\n\n\n<p class=\"box_style box_style04 bdr_gray\">Dim x As Double<br>x = 1.79769313486232<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u65e5\u671f\u7c7b\u578b\uff08Date\uff09<\/h3>\n\n\n\n<p>\u65e5\u671f\u548c\u65f6\u95f4\u53ef\u4ee5\u5206\u914d\u7ed9\u53d8\u91cf\u3002<br>\u65e5\u671f\u7684\u5199\u6cd5\u662f\u6708\/\u65e5\/\u5e74\uff0c\u524d\u540e\u52a0\u4e0a #\u3002<\/p>\n\n\n\n<p class=\"box_style box_style04 bdr_gray\">Dim x As Date<br>x = #6\/1\/2013#<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b57\u7b26\u4e32\u7c7b\u578b\uff08String\uff09<\/h3>\n\n\n\n<p>\u6c49\u5b57\u3001\u5e73\u5047\u540d\u3001\u7247\u5047\u540d\u3001\u5b57\u6bcd\u6570\u5b57\u5b57\u7b26\u3001\u7b26\u53f7\u7b49\u90fd\u53ef\u4ee5\u5206\u914d\u7ed9\u53d8\u91cf\u3002<br>\u5bf9\u4e8e\u56fa\u5b9a\u957f\u5ea6\u7684\u5b57\u7b26\u4e32\u7c7b\u578b\uff0c\u5982\u679c\u5206\u914d\u7684\u503c\u5c0f\u4e8e\u6307\u5b9a\u7684\u5b57\u7b26\u6570\uff0c\u5219\u4f1a\u5728\u5269\u4f59\u7684\u7a7a\u683c\u4e2d\u5d4c\u5165\u7a7a\u683c\uff1b\u5982\u679c\u503c\u5927\u4e8e\u6307\u5b9a\u7684\u5b57\u7b26\u6570\uff0c\u5219\u4f1a\u622a\u65ad\u8f83\u5927\u7684\u5b57\u7b26\u6570\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u53d8\u957f\u5b57\u7b26\u4e32\u7c7b\u578b<\/h4>\n\n\n\n<p class=\"box_style box_style04 bdr_gray\">Dim x As String<br>x = &#8220;\u3042\u3044\u3046\u3048\u304a&#8221;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u5b9a\u957f\u5b57\u7b26\u4e32\u7c7b\u578b<\/h4>\n\n\n\n<p class=\"box_style box_style04 bdr_gray\">Dim x As String * 5<br>x = &#8220;\u3042\u3044\u3046\u3048\u304a&#8221;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5e03\u5c14\u6570\u636e\u7c7b\u578b\uff08Boolean\uff09<\/h3>\n\n\n\n<p>\u53d8\u91cf\u53ea\u80fd\u8d4b\u503c\u4e3a True \u6216 False\u3002<br>\u4e0d\u80fd\u8d4b\u503c\u4e3a True \u6216 False\uff0c\u8d4b\u503c\u4e3a-1 \u8868\u793a True\uff0c\u8d4b\u503c\u4e3a 0 \u8868\u793a False\u3002<\/p>\n\n\n\n<p class=\"box_style box_style04 bdr_gray\">Dim x As Boolean<br>x = True<\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p>\u6709\u5173\u53d8\u91cf\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605 \u2193\u3002<\/p>\n\n\n<div class=\"keni-link-card_wrap\"><blockquote class=\"keni-link-card\"><div class=\"keni-link-card_thumb\"><a href=\"https:\/\/lilia-study.com\/excel\/excel-vba\/var\/\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" src=\"https:\/\/lilia-study.com\/wp-content\/uploads\/2013\/05\/vba-variable.webp\" width=\"150\" alt=\"\" loading=\"lazy\"><\/a><\/div><div class=\"keni-link-card_title\"><a href=\"https:\/\/lilia-study.com\/excel\/excel-vba\/var\/\" target=\"_blank\" rel=\"noopener\">Excel VBA \u5909\u6570\u3063\u3066\u4f55\uff1f \uff5c \u30ea\u30ea\u30a2\u306e\u30d1\u30bd\u30b3\u30f3\u5b66\u7fd2\u8a18<\/a><\/div><div class=\"keni-link-card_url\"><cite><a href=\"https:\/\/lilia-study.com\/excel\/excel-vba\/var\/\" target=\"_blank\" rel=\"noopener\">https:\/\/lilia-study.com\/excel\/excel-vba\/var\/<\/a><\/cite><\/div><div class=\"keni-link-card_desc\">Excel VBA\u306e\u5909\u6570\u3068\u306f \u30c7\u30fc\u30bf\u3092\u4e00\u6642\u7684\u306b\u683c\u7d0d\u3059\u308b\u305f\u3081\u306e\u540d\u524d\u3092\u3064\u3051\u305f\u30e1\u30e2\u30ea\u4e0a\u306e\u5834\u6240\uff01 \u7bb1\u306e\u3088\u3046\u306a\u3082\u306e\u3092\u30a4\u30e1\u30fc\u30b8\u3059\u308b\u3068\u308f\u304b\u308a\u3084\u3059\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3067\u3059\u306d\u3002 \u5909\u6570\u306e\u540d\u524d\u306e\u6587\u5b57\u306f \u30fb\u82f1\u6570\u5b57 \u30fb\u6f22\u5b57 \u30fb\u3072\u3089\u304c\u306a \u30fb\u30ab\u30bf\u30ab\u30ca \u30fb\u30a2 \u2026<\/div><\/blockquote><\/div>\n\n\n\n<p>\u3000<\/p>\n\n\n<p><!-- wp:html --><\/p>\n<p style=\"margin-bottom:0;padding-bottom:0;\">&lt;&nbsp;Sponsored Links&nbsp;&gt;<\/p>\n<p><script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-4504956686889525\"\n     crossorigin=\"anonymous\"><\/script><br \/>\n<!-- lilia bottom --><br \/>\n<ins class=\"adsbygoogle\"\n     style=\"display:inline-block;width:336px;height:280px\"\n     data-ad-client=\"ca-pub-4504956686889525\"\n     data-ad-slot=\"7848928897\"><\/ins><br \/>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><br \/>\n<!-- \/wp:html --><\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Excel \u4e2d\u4f7f\u7528 VBA \u65f6\uff0c\u6211\u4eec\u7ecf\u5e38\u4f7f\u7528 \u201c\u53d8\u91cf\u201d\u3002 \u53d8\u91cf\u6709\u5404\u79cd \u201c\u6570\u636e\u7c7b\u578b\u201d\uff0c\u5982\u6570\u5b57\u3001\u5b57\u7b26\u4e32\u3001\u65e5\u671f\u7b49\u3002 \u5982\u679c\u4f7f\u7528\u9002\u5f53\u7684\u7c7b\u578b\uff0c\u5c31\u53ef\u4ee5\u907f\u514d\u53ef\u80fd\u610f\u60f3\u4e0d\u5230\u7684\u9519\u8bef\u3002 \u6570\u636e\u7c7b\u578b Byte type Byte \u4ece 0 \u5230 2 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,2],"tags":[],"class_list":{"0":"post-36","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-excel","7":"category-excel-vba"},"_links":{"self":[{"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/posts\/36","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/comments?post=36"}],"version-history":[{"count":0,"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/posts\/36\/revisions"}],"wp:attachment":[{"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/media?parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/categories?post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/tags?post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}