{"id":68,"date":"2024-10-18T07:04:36","date_gmt":"2024-10-17T23:04:36","guid":{"rendered":"https:\/\/lilia-study.com\/lang\/eng\/?p=68"},"modified":"2024-10-18T07:04:37","modified_gmt":"2024-10-17T23:04:37","slug":"shp-text-font-size","status":"publish","type":"post","link":"https:\/\/lilia-study.com\/lang\/chs\/excel\/excel-vba\/shape\/shp-text-font-size\/","title":{"rendered":"Excel VBA \u66f4\u6539\u6570\u5b57\u7684\u5b57\u7b26\u5927\u5c0f\uff08\u81ea\u52a8\u6574\u5f62\uff09-TextFrame.Characters.Font.Size"},"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>\u8fd9\u662f\u4f7f\u7528<strong>Excel<\/strong> <strong>VBA \u66f4\u6539<\/strong>\u5de5\u4f5c\u8868\u4e2d<strong>\u5f62\u72b6<\/strong>\uff08<strong>\u81ea\u52a8\u5f62\u72b6<\/strong>\uff09<strong>\u5b57\u4f53\u5927\u5c0f\u7684<\/strong>\u8bb0\u5f55\u3002<\/p>\n\n\n\n<p>\u8981\u66f4\u6539\u5f62\u72b6\u4e0a\u7684\u5b57\u4f53\u5927\u5c0f\uff0c\u8bf7\u4f7f\u7528 \u201c<strong>TextFrame<\/strong>\u201d\u5bf9\u8c61\u4e2d \u201c<strong>Characters<\/strong>\u201d\u5bf9\u8c61\u7684 \u201c<strong>Font.Size<\/strong>\u201d\u5c5e\u6027\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\">\u66f4\u6539\u5f62\u72b6\uff08\u81ea\u52a8\u5f62\u72b6\uff09\u6587\u5b57\u5927\u5c0f\u7684\u793a\u4f8b<\/h2>\n\n\n\n<p>\u5728\u56fe\u4e2d\u6dfb\u52a0\u6587\u5b57 \u201c\u3042\u3044\u3046\u3048\u304a\u201d\uff0c\u5e76\u5c06\u5b57\u4f53\u5927\u5c0f\u8bbe\u7f6e\u4e3a 15 \u70b9\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro m30-b\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#2e3440ff\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" data-code=\"Sub test()\n    Dim shp As Shape\n    Set shp = ActiveSheet.Shapes(1)\n\n    With shp.TextFrame.Characters\n        .Text = \u201c\u3042\u3044\u3046\u3048\u304a\u201d\n        .Font.Size = 15\n    End With\nEnd Sub\" style=\"color:#d8dee9ff;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki nord\" style=\"background-color: #2e3440ff\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #81A1C1\">Sub<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #88C0D0\">test<\/span><span style=\"color: #ECEFF4\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">Dim<\/span><span style=\"color: #D8DEE9\"> shp <\/span><span style=\"color: #81A1C1\">As<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #8FBCBB\">Shape<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">Set <\/span><span style=\"color: #D8DEE9\">shp<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> ActiveSheet.<\/span><span style=\"color: #88C0D0\">Shapes<\/span><span style=\"color: #ECEFF4\">(<\/span><span style=\"color: #B48EAD\">1<\/span><span style=\"color: #ECEFF4\">)<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #81A1C1\">With<\/span><span style=\"color: #D8DEE9FF\"> shp.TextFrame.Characters<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        .<\/span><span style=\"color: #D8DEE9\">Text<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> \u201c\u3042\u3044\u3046\u3048\u304a\u201d<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">        .Font.<\/span><span style=\"color: #D8DEE9\">Size<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">=<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #B48EAD\">15<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D8DEE9FF\">    <\/span><span style=\"color: #88C0D0\">End<\/span><span style=\"color: #D8DEE9FF\"> <\/span><span style=\"color: #81A1C1\">With<\/span><\/span>\n<span class=\"line\"><span style=\"color: #81A1C1\">End Sub<\/span><\/span><\/code><\/pre><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/lilia-study.com\/wp-content\/uploads\/2020\/09\/01.png\" alt=\"\u30c6\u30ad\u30b9\u30c8\u30b5\u30a4\u30ba\" class=\"wp-image-695\"\/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/lilia-study.com\/wp-content\/uploads\/2020\/09\/02.png\" alt=\"\u30c6\u30ad\u30b9\u30c8\u30b5\u30a4\u30ba\" class=\"wp-image-696\"\/><\/figure>\n<\/div>\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>\u8fd9\u662f\u4f7f\u7528Excel VBA \u66f4\u6539\u5de5\u4f5c\u8868\u4e2d\u5f62\u72b6\uff08\u81ea\u52a8\u5f62\u72b6\uff09\u5b57\u4f53\u5927\u5c0f\u7684\u8bb0\u5f55\u3002 \u8981\u66f4\u6539\u5f62\u72b6\u4e0a\u7684\u5b57\u4f53\u5927\u5c0f\uff0c\u8bf7\u4f7f\u7528 \u201cTextFrame\u201d\u5bf9\u8c61\u4e2d \u201cCharacters\u201d\u5bf9\u8c61\u7684 \u201cFont.Size\u201d\u5c5e\u6027\u3002 \u66f4\u6539\u5f62\u72b6\uff08\u81ea\u52a8\u5f62\u72b6\uff09\u6587 [&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,9],"tags":[],"class_list":{"0":"post-68","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-excel","7":"category-excel-vba","8":"category-shape"},"_links":{"self":[{"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/posts\/68","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=68"}],"version-history":[{"count":0,"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"wp:attachment":[{"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lilia-study.com\/lang\/chs\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}