{"id":3236,"date":"2017-06-23T17:04:37","date_gmt":"2017-06-23T08:04:37","guid":{"rendered":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/?p=3236"},"modified":"2017-06-23T18:51:07","modified_gmt":"2017-06-23T09:51:07","slug":"vba-%e3%82%b3%e3%83%b3%e3%83%9c%e3%83%9c%e3%83%83%e3%82%af%e3%82%b9%e3%81%a7html%e3%82%bb%e3%83%ac%e3%82%af%e3%83%88%e3%83%9c%e3%83%83%e3%82%af%e3%82%b9%e9%a2%a8","status":"publish","type":"post","link":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/2017\/06\/23\/3236\/","title":{"rendered":"VBA: \u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\u3067HTML\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9\u98a8"},"content":{"rendered":"<p>VBA\u306e\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\u3092\u4f7f\u3063\u3066\u3044\u3066\u3001\u9078\u629e\u5019\u88dc\u3092\u8a2d\u5b9a\u3059\u308b\u306e\u306f\u3044\u3044\u306e\u3060\u304c\u3001\u305d\u306e\u307e\u307e\u3060\u3068\u8868\u793a\u3057\u305f\u6587\u5b57\u5217\u3092\u305d\u306e\u307e\u307e\u9078\u3076\u3060\u3051\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u3066\u3001\u305d\u306e\u5019\u88dc\u306b\u5bfe\u5fdc\u3057\u305f\u30b7\u30ea\u30a2\u30eb\u5024\u306a\u3069\u304c\u3042\u308b\u5834\u5408\u306b\u3001\u3044\u3061\u3044\u3061\u9078\u629e\u5f8c\u306bif\u6587\u3084\u914d\u5217\u3067\u305d\u306e\u5bfe\u5fdc\u95a2\u4fc2\u3092\u4e0e\u3048\u76f4\u3059\u51e6\u7406\u3092\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3053\u3068\u304c\u3042\u308b\u3002<\/p>\n<p>HTML\u306e\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9\u306e\u3088\u3046\u306b\u300c<code>&lt;option value=\"1\"&gt;\u592a\u90ce&lt;\/option&gt;<\/code>\u300d\u306e\u3088\u3046\u306b\u3001\u8868\u793a\u3059\u308b\u9805\u76ee\u540d\u3068\u3001\u30b7\u30b9\u30c6\u30e0\u5074\u306b\u4e0e\u3048\u308b\u5024\u3068\u3092\u5148\u306b\u5bfe\u5fdc\u4ed8\u3051\u3066\u304a\u3044\u3066\u81ea\u52d5\u3067\u8a2d\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u304b\u3063\u305f<\/p>\n<ul>\n<li><a href=\"http:\/\/www.tagindex.com\/html_tag\/form\/select.html\">HTML\u30bf\u30b0\/\u30d5\u30a9\u30fc\u30e0\u30bf\u30b0\/\u30bb\u30ec\u30af\u30c8\u30dc\u30c3\u30af\u30b9\u3092\u4f5c\u308b &#8211; TAG index<br \/>\n<\/a>\n<\/ul>\n<p>\u306e\u3060\u304c\u3001\u305d\u308c\u306b\u3051\u3063\u3053\u3046\u624b\u9593\u53d6\u3063\u305f\u3002<\/p>\n<p>\u7d50\u8ad6\u3068\u3057\u3066\u306f\u3001\u8907\u6570\u5217\uff08\uff12\u5217\uff09\u306e\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\u3067\u3001\u4e00\u65b9\u306e\u5217\u3092\u975e\u8868\u793a\u306b\u3057\u3066\u8868\u793a\u3092\uff11\u5217\u306b\u3057\u3001\u975e\u8868\u793a\u5074\u306e\u5217\u3092\u5024\u7528\u306b\u6307\u5b9a\u3057\u305f\uff08<a href=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9-\u9805\u76ee\u540d\u3068\u53d6\u5f97\u5024\u306e\u9078\u308a\u5206\u3051\u30b5\u30f3\u30d7\u30eb.xlsm\">\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9 \u9805\u76ee\u540d\u3068\u53d6\u5f97\u5024\u306e\u9078\u308a\u5206\u3051\u30b5\u30f3\u30d7\u30eb.xlsm<\/a>\uff09\u3002<\/p>\n<p>\u30d5\u30a9\u30fc\u30e0\u3092\u7528\u610f\u3057\u3066\u3001\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\uff08ComboBox1\uff09\u3068\u30b3\u30de\u30f3\u30c9\u30dc\u30bf\u30f3\uff08CommandButton1\uff09\u3092\u9069\u5f53\u306b\u8cbc\u308a\u3064\u3051\u308b\u3002<br \/>\n<img decoding=\"async\" src=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623153825-300x254.png\" alt=\"\" width=\"300\" class=\"aligncenter size-medium wp-image-3241\" srcset=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623153825-300x254.png 300w, http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623153825-150x127.png 150w, http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623153825.png 343w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/> <img decoding=\"async\" src=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623153649-300x222.png\" alt=\"\" width=\"300\" class=\"aligncenter size-medium wp-image-3240\" srcset=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623153649-300x222.png 300w, http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623153649-150x111.png 150w, http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623153649.png 329w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>\u5143\u30c7\u30fc\u30bf\u306f\u3001\u3053\u3053\u3067\u306fSheet1!A1:B4\u3068\u3057\u3066\u7528\u610f\u3057\u305f\u3002A\u5217\u306b\u756a\u53f7\u3001B\u5217\u306b\u9805\u76ee\u540d\uff08\u3053\u3053\u3067\u306f\u540d\u524d\uff09\u304c\u5165\u3063\u3066\u3044\u308b\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623153242.png\" alt=\"\" width=\"217\" height=\"211\" class=\"aligncenter size-full wp-image-3239\" srcset=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623153242.png 217w, http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623153242-150x146.png 150w\" sizes=\"(max-width: 217px) 100vw, 217px\" \/><\/p>\n<p>\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\u306e\u521d\u671f\u5316\u306f\u3001\u30d5\u30a9\u30fc\u30e0\u306e\u30b3\u30fc\u30c9\u3067\u4e0b\u8a18\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u305f\u3002<\/p>\n<div class=\"hl-surround\" ><div class=\"hl-main\"><pre>Private Sub UserForm_Initialize()\r\n    With ComboBox1\r\n        .ColumnCount = 2            '\u8868\u793a\u5217\u6570\r\n        .TextColumn = 2             '\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u3068.Text\u306b\u5272\u308a\u5f53\u3066\u308b\u5217\u306e\u6307\u5b9a\r\n        .BoundColumn = 1            '.Value\u306b\u5272\u308a\u5f53\u3066\u308b\u5217\u306e\u6307\u5b9a\r\n        .RowSource = &quot;Sheet1!A1:B4&quot; '\u30b7\u30fc\u30c8\u7bc4\u56f2\u3092\u5024\u306b\u6307\u5b9a\r\n        .ColumnWidths = &quot;0;-1&quot;      '\u5217\u5e45\u30920\uff08\u975e\u8868\u793a\uff09\u3068-1\uff08\u5e45\u81ea\u52d5\u8abf\u6574\uff09\r\n    End With\r\nEnd Sub\r\n\r\nSub CommandButton1_Click()\r\n    MsgBox &quot;\u5024=&quot; &amp; ComboBox1.Value   '.Value\u3092\u53d6\u5f97\u3059\u308b\u3068.BoundColumn\u306e\u5217\u304c\u5f97\u3089\u308c\u308b\r\nEnd Sub<\/pre><\/div><\/div>\n<p>\u3053\u3053\u3067\u3001\u300c.TextColumn\u300d\u306e\u6307\u5b9a\u304c\u306a\u304b\u306a\u304b\u628a\u63e1\u3057\u306b\u304f\u304f\u3001\u89e3\u8aac\u30b5\u30a4\u30c8\u306b\u3088\u308b\u3068\u300c\u8868\u793a\u5217\u300d\u3068\u306a\u3063\u3066\u3044\u3066\u3001\u305a\u3063\u3068\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u3059\u308b\u3068\u304d\u306b\u8868\u793a\u3059\u308b\u5217\u306e\u6307\u5b9a\u304b\u3068\u601d\u3063\u3066\u3044\u305f\u306e\u3060\u304c\u3001\u305d\u3046\u3067\u306f\u306a\u304f\u3001\u5358\u306b\u9078\u629e\u5f8c\u306e\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u3078\u306e\u8868\u793a\u3068.Text\u5c5e\u6027\u3067\u5f97\u3089\u308c\u308b\u5217\u306e\u6307\u5b9a\u3067\u3001\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u6642\u306e\u8868\u793a\uff08\u5e45\u306e\uff09\u6307\u5b9a\u306f.ColumnWidth\u3067\u884c\u306a\u3046\u5fc5\u8981\u304c\u3042\u3063\u305f\uff08\u5e450\u3067\u975e\u8868\u793a\u3001\u5e45-1\u304b\u7a7a\u767d\u3067\u81ea\u52d5\u8abf\u6574\u306e\u6307\u5b9a\uff09\u3002<\/p>\n<p>\u901a\u5e38\u306e\u305d\u306e\u307e\u307e\u8907\u6570\u5217\u306b\u3057\u305f\u3060\u3051\u3060\u3068\u3001\u6b21\u306e\u3088\u3046\u306a\u8868\u793a\u3068\u306a\u308b\u3002<br \/>\n<img decoding=\"async\" src=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623163152-300x227.png\" alt=\"\" width=\"300\" class=\"aligncenter size-medium wp-image-3242\" srcset=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623163152-300x227.png 300w, http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623163152-150x114.png 150w, http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623163152.png 330w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><br \/>\n\u9805\u76ee\u3092\u9078\u629e\u3057\u305f\u5834\u5408\u306f\u3001\uff11\u5217\u76ee\u306e\u5024\u304c\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u306b\u5165\u308a\u3001.Value\u3067\u53d6\u5f97\u3055\u308c\u308b\u5024\u3082\u540c\u3058\u5024\u3068\u306a\u308b\u3002<\/p>\n<p>\u4e00\u65b9\u3001\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u3092\u4f7f\u3063\u3066\u3001\u8907\u6570\u5217\u3067\u3082\u8868\u793a\u5e45\u3092\u6307\u5b9a\u3057\u3066\uff12\u5217\u76ee\u3060\u3051\u306e\u8868\u793a\u306b\u3057\u305f\u5834\u5408\u3060\u3068\u6b21\u306e\u8868\u793a\u3068\u306a\u308b\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623162548-300x227.png\" alt=\"\" width=\"300\" height=\"227\" class=\"aligncenter size-medium wp-image-3243\" srcset=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623162548-300x227.png 300w, http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623162548-150x114.png 150w, http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623162548.png 330w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><br \/>\n\u9805\u76ee\u3092\u9078\u629e\u3057\u305f\u5834\u5408\u306f\u3001.TextColumn\u3067\u6307\u5b9a\u3057\u305f\uff12\u5217\u76ee\u306e\u5024\u304c\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u306b\u5165\u308a\u3001.Text\u5c5e\u6027\u3067\u3082\u3053\u3061\u3089\u304c\u4f7f\u308f\u308c\u308b\u3002<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u30dc\u30bf\u30f3\u3067\u51e6\u7406\u3067\u306f.Value\u3092\u5f97\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u3066\u3001\u3053\u3053\u3067\u306f.BoundColumn\u3067\u6307\u5b9a\u3057\u305f\uff11\u5217\u76ee\u306e\u5024\u304c\u5f97\u3089\u308c\u3066\u3044\u308b\u3002<br \/>\n<img decoding=\"async\" src=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623162605.png\" alt=\"\" width=\"154\" class=\"aligncenter size-full wp-image-3244\" srcset=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623162605.png 154w, http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-content\/uploads\/2017\/06\/20170623162605-130x150.png 130w\" sizes=\"(max-width: 154px) 100vw, 154px\" \/><\/p>\n<p>\u53c2\u8003\uff1a<\/p>\n<ul>\n<li><a href=\"http:\/\/www.officepro.jp\/excelvbaform\/form_list\/index7.html\">\u8907\u6570\u5217\u306e\u30ea\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u3092\u4f5c\u6210\u3059\u308b &#8211; \u30ea\u30b9\u30c8\u30dc\u30c3\u30af\u30b9 &#8211; Excel\u30d5\u30a9\u30fc\u30e0<br \/>\n<\/a><\/p>\n<ul>\n<li>\u8907\u6570\u306e\u5217\u3092\u5229\u7528\u3059\u308b\u5834\u5408\u306b\u5217\u6bce\u306e\u5e45\u3092\u8a2d\u5b9a\u3059\u308b\u306b\u306f\u300cColumnWidths\u300d\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3044\u307e\u3059\u3002\n<li>\u7a7a\u767d\u306b\u3059\u308b\u304b\u3001-1 \u3092\u6307\u5b9a\u3057\u305f\u3068\u304d\u306b\u306f\u5217\u5e45\u304c\u7b97\u51fa\u3055\u308c\u307e\u3059\u3002\u5e45\u304c 0 \u306b\u8a2d\u5b9a\u3055\u308c\u305f\u5217\u306f\u8868\u793a\u3055\u308c\u307e\u305b\u3093\u3002\n<li>\u8907\u6570\u306e\u5217\u306e\u5e45\u3092\u540c\u6642\u306b\u6307\u5b9a\u3059\u308b\u3068\u304d\u306f\u3001\u30bb\u30df\u30b3\u30ed\u30f3 (;) \u3092\u533a\u5207\u308a\u8a18\u53f7\u306b\u4f7f\u3044\u307e\u3059\u3002\n <\/ul>\n<li><a href=\"http:\/\/blog.livedoor.jp\/katsuyausami\/archives\/13803407.html\">IT\u5de5\u52d9\u5e97\u3000\u5e97\u4e3b\u306e\u3064\u3076\u3084\u304d\u65e5\u8a18:(\u30a8\u30af\u30bb\u30ebVBA)\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\u306b\u8907\u6570\u5217\u3092\u8868\u793a\u3059\u308b<br \/>\n<\/a><\/p>\n<li><a href=\"http:\/\/www.moug.net\/tech\/exvba\/0090021.html\">\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\u306e\u30ea\u30b9\u30c8\u3092\u8907\u6570\u5217\u8868\u793a\u3059\u308b\uff1aExcel VBA\uff5c\u5373\u52b9\u30c6\u30af\u30cb\u30c3\u30af\uff5cExcel VBA\u3092\u5b66\u3076\u306a\u3089moug<br \/>\n<\/a><\/p>\n<ul>\n<li>\u203b\u4e0a\u8a18\u306e\u30ea\u30b9\u30c8\u306f\u3053\u3061\u3089\u306e\u30b5\u30a4\u30c8\u306e\u3082\u306e\u3092\u30d9\u30fc\u30b9\u306b\u3055\u305b\u3066\u9802\u304d\u307e\u3057\u305f\u3002\n<\/ul>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>VBA\u306e\u30b3\u30f3\u30dc\u30dc\u30c3\u30af\u30b9\u3092\u4f7f\u3063\u3066\u3044\u3066\u3001\u9078\u629e\u5019\u88dc\u3092\u8a2d\u5b9a\u3059\u308b\u306e\u306f\u3044\u3044\u306e\u3060\u304c\u3001\u305d\u306e\u307e\u307e\u3060\u3068\u8868\u793a\u3057\u305f\u6587\u5b57\u5217\u3092\u305d\u306e\u307e\u307e\u9078\u3076\u3060\u3051\u306b\u306a\u3063\u3066\u3057\u307e\u3063\u3066\u3001\u305d\u306e\u5019\u88dc\u306b\u5bfe\u5fdc\u3057\u305f\u30b7\u30ea\u30a2\u30eb\u5024\u306a\u3069\u304c\u3042\u308b\u5834\u5408\u306b\u3001\u3044\u3061\u3044\u3061\u9078\u629e\u5f8c\u306bif\u6587\u3084\u914d\u5217\u3067\u305d\u306e\u5bfe\u5fdc\u95a2\u4fc2 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[417,418],"_links":{"self":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/3236"}],"collection":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/comments?post=3236"}],"version-history":[{"count":17,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/3236\/revisions"}],"predecessor-version":[{"id":3264,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/3236\/revisions\/3264"}],"wp:attachment":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/media?parent=3236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/categories?post=3236"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/tags?post=3236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}