{"id":2428,"date":"2019-04-01T09:11:14","date_gmt":"2019-04-01T00:11:14","guid":{"rendered":"https:\/\/promidea.co.jp\/?p=2428"},"modified":"2021-08-03T10:42:03","modified_gmt":"2021-08-03T01:42:03","slug":"vba%e3%81%a7%e3%82%b9%e3%82%af%e3%83%ac%e3%82%a4%e3%83%94%e3%83%b3%e3%82%b0%e3%80%82%e6%8c%87%e5%ae%9a%e3%83%af%e3%83%bc%e3%83%891%e4%bd%8d%e3%81%aeurl%e3%82%92%e5%8f%96%e5%be%97%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/promidea.co.jp\/?p=2428","title":{"rendered":"VBA\u3067\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3002\u6307\u5b9a\u30ef\u30fc\u30c91\u4f4d\u306eURL\u3092\u53d6\u5f97\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0"},"content":{"rendered":"<p>\u30d7\u30ed\u30df\u30c7\u30a3\u30a2\u5408\u540c\u4f1a\u793e\u306e\u6589\u85e4\u3067\u3059\u3002<\/p>\n<p>\u4ee5\u524d<a href=\"https:\/\/crowdworks.jp\/\" target=\"_blank\" rel=\"noopener\">\u30af\u30e9\u30a6\u30c9\u30ef\u30fc\u30af\u30b9<\/a>\u3067<\/p>\n<div class=\"yellowbox\">\n<p><span class=\"huto\">\u300cExcel\u306e\u8868\u306b\u4f01\u696d\u540d\u304c\u305f\u304f\u3055\u3093\u5165\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u308c\u305e\u308c\u306e\u4f01\u696d\u540d\u3067\u691c\u7d22\u3057\u30661\u4f4d\u306b\u51fa\u3066\u304d\u305fURL\u3092\u8868\u306b\u8a18\u9332\u3057\u3066\u3044\u304d\u305f\u3044\u300d<\/span><\/p>\n<\/div>\n<p>\u3068\u3044\u3046\u8981\u4ef6\u304c\u3042\u308a\u3001VBA\u3067\u30b5\u30f3\u30d7\u30eb\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u305d\u306e\u6848\u4ef6\u306f\u3051\u3063\u304d\u3087\u304f\u53d7\u6ce8\u3067\u304d\u306a\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u305b\u3063\u304b\u304f\u306a\u306e\u3067\u4f5c\u6210\u3057\u305f\u30b5\u30f3\u30d7\u30eb\u3092\u516c\u958b\u3057\u307e\u3059\u3002<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-2445\" src=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/04\/13e0e516cc0abc9e33b9a28ccc9994c0.gif\" alt=\"VBA\u3067\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3002\u6307\u5b9a\u30ef\u30fc\u30c91\u4f4d\u306eURL\u3092\u53d6\u5f97\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\" width=\"800\" height=\"222\" \/><\/p>\n<!--TOC-->\n<h2>VBA\u3067\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u306e\u4ed5\u69d8<\/h2>\n<p>\u2460 IE\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u5229\u7528\u3059\u308b<\/p>\n<p>\u2461 \u30bb\u30eb\u306b\u5165\u529b\u3057\u3066\u304a\u3044\u305f\u4f01\u696d\u540d\u3092\u30ad\u30fc\u30ef\u30fc\u30c9\u3068\u3057\u3066\u30b0\u30fc\u30b0\u30eb\u3067\u691c\u7d22\u3059\u308b<\/p>\n<p>\u2462 \u30ec\u30b9\u30dd\u30f3\u30b9\u3055\u308c\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u304b\u30891\u4f4d\u306eURL\u304c\u5165\u3063\u3066\u3044\u308b\u90e8\u5206\u3092\u53d6\u5f97\u3057\u3066\u3001\u305d\u308c\u3092\u4f01\u696d\u540d\u53f3\u306e\u30bb\u30eb\u306b\u633f\u5165\u3059\u308b<\/p>\n<p>\u2463 4\u79d2\u5f85\u3064<\/p>\n<p>&nbsp;<\/p>\n<h2>\u5b9f\u88c5\u306e\u30dd\u30a4\u30f3\u30c8<\/h2>\n<p>\u5b9f\u88c5\u306e\u30dd\u30a4\u30f3\u30c8\u3060\u3051\u4ee5\u4e0b\u3067\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<h3>IE\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u751f\u6210<\/h3>\n<pre class=\"lang:default decode:true \">Set objIE = CreateObject(\"InternetExplorer.Application\")<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u30b0\u30fc\u30b0\u30eb\u3067\u691c\u7d22\u3059\u308b<\/h3>\n<pre class=\"lang:default decode:true \">objIE.navigate \"https:\/\/www.google.co.jp\/search?q=\" &amp; company<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u691c\u7d22\u7d50\u679c\u304c\u8fd4\u3055\u308c\u308b\u307e\u3067\u5f85\u3064<\/h3>\n<pre class=\"lang:default decode:true \">IEWait objIE 'IE\u306e\u8aad\u307f\u8fbc\u307f\u5f85\u3061\r\n\r\n\u2193\u95a2\u6570\r\n'IE\u3092\u5f85\u6a5f\u3059\u308b\r\nFunction IEWait(ByRef objIE As Object)\r\n    Do While objIE.Busy = True Or objIE.READYSTATE &lt;&gt; 4\r\n    DoEvents\r\n    Loop\r\nEnd Function\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3>\u691c\u7d22\u7d50\u679c\u304b\u30891\u4f4d\u306eURL\u3092\u53d6\u5f97\u3059\u308b<\/h3>\n<pre class=\"lang:default decode:true \">Cells(i, 3).Value = objIE.document.getElementsByClassName(\"rc\")(0).GetElementsByTagName(\"a\")(0).href<\/pre>\n<p>&nbsp;<\/p>\n<p>1\u4ef6\u8aad\u307f\u8fbc\u3093\u3060\u5f8c\u306b\u30014\u79d2\u9593\u4f55\u3082\u305b\u305a\u5f85\u3064\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u30a6\u30a8\u30a4\u30c8\u6642\u9593\u304c\u7121\u3044\u3068\u300150\u4ef6\u904e\u304e\u305f\u3042\u305f\u308a\u3067\u30b0\u30fc\u30b0\u30eb\u304b\u3089\u8a8d\u8a3c\u304c\u6c42\u3081\u3089\u308c\u3066\u3057\u307e\u3046\u304b\u3089\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u8ab2\u984c<\/h2>\n<p>\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u304c\u3067\u304d\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306e\u30b5\u30f3\u30d7\u30eb\u306a\u306e\u3067\u3001\u30a8\u30e9\u30fc\u51e6\u7406\u306a\u3069\u3001\u7d30\u304b\u3044\u5bfe\u5fdc\u306f\u5165\u308c\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n<div class=\"redbox\">\n<p>\u30fb\u8aad\u307f\u8fbc\u307f\u4ef6\u6570\u306f\u56fa\u5b9a\u5024\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u30fb\u30a8\u30e9\u30fc\u51e6\u7406\u306f\u5165\u308c\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n<p>\u30fb\u4e2d\u65ad\u3055\u305b\u308b\u51e6\u7406\u306f\u5165\u308c\u3066\u3044\u307e\u305b\u3093\u3002<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<h2>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/h2>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-2431\" src=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/03\/excel1.png\" alt=\"VBA\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u30b5\u30f3\u30d7\u30eb\" width=\"547\" height=\"464\" srcset=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/03\/excel1.png 547w, https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/03\/excel1-300x254.png 300w\" sizes=\"(max-width: 547px) 100vw, 547px\" \/><\/p>\n<p>\u4eca\u56de\u3054\u7d39\u4ecb\u3057\u305f\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u4e0b\u306e\u30dc\u30bf\u30f3\u304b\u3089<span class=\"huto\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/span>\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"rankstlink-r2\">\n<p><a href=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/04\/b3568d31350504b3d05c9126cf7c985b.xlsm\" download=\"sample_scraping_vba.xlsm\">\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d7\u30ed\u30df\u30c7\u30a3\u30a2\u5408\u540c\u4f1a\u793e\u306e\u6589\u85e4\u3067\u3059\u3002 \u4ee5\u524d\u30af\u30e9\u30a6\u30c9\u30ef\u30fc\u30af\u30b9\u3067 \u300cExcel\u306e\u8868\u306b\u4f01\u696d\u540d\u304c\u305f\u304f\u3055\u3093\u5165\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u308c\u305e\u308c\u306e\u4f01\u696d\u540d\u3067\u691c\u7d22\u3057\u30661\u4f4d\u306b\u51fa\u3066\u304d\u305fURL\u3092\u8868\u306b\u8a18\u9332\u3057\u3066\u3044\u304d\u305f\u3044\u300d \u3068\u3044\u3046\u8981\u4ef6\u304c\u3042\u308a\u3001VBA\u3067\u30b5\u30f3\u30d7\u30eb\u3092\u4f5c\u6210 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":2434,"comment_status":"open","ping_status":"open","sticky":false,"template":"page-templates\/right-sidebar.php","format":"standard","meta":[],"categories":[67,66],"tags":[],"_links":{"self":[{"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2428"}],"collection":[{"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2428"}],"version-history":[{"count":19,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2428\/revisions"}],"predecessor-version":[{"id":2453,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2428\/revisions\/2453"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/media\/2434"}],"wp:attachment":[{"href":"https:\/\/promidea.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}