{"id":3798,"date":"2015-09-29T17:15:25","date_gmt":"2015-09-29T08:15:25","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=3798"},"modified":"2015-09-29T17:16:14","modified_gmt":"2015-09-29T08:16:14","slug":"refworkbookwindow","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/refworkbookwindow\/","title":{"rendered":"\u30d6\u30c3\u30af\u3092\u53c2\u7167\uff08Workbooks \u30d7\u30ed\u30d1\u30c6\u30a3,Windows \u30d7\u30ed\u30d1\u30c6\u30a3\uff09"},"content":{"rendered":"<h2>\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u3092\u53c2\u7167<\/h2>\n<div class=\"m30-l\">\n<p>\u73fe\u5728\u4f7f\u7528\u4e2d\u306e\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u3001\u8907\u6570\u3042\u308b\u5834\u5408\u306f\u4e00\u756a\u624b\u524d\u306b\u3042\u308b\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u3092\u53c2\u7167\u3059\u308b\u306b\u306f\u3001<strong>ActiveWorkbook \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>ActiveWorkbook<\/strong><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Application \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/>\n<p class=\"caution4\">\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30d6\u30c3\u30af\u306e\u540d\u524d\u3092\u53d6\u5f97\u30fb\u8a2d\u5b9a\u3059\u308b\u306b\u306f\uff1f<br \/>\n    \u3000\uff08\u4f8b\uff09<br \/>\n    \u3000\u3000ActiveWorkbook.<strong>Name<\/strong><\/p>\n<\/div>\n<br \/><br \/>\n<h2>\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u3092\u53c2\u7167\u3059\u308b<\/h2>\n<div class=\"m30-l\">\n<p>\u73fe\u5728\u958b\u3044\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u3092\u53c2\u7167\u3059\u308b\u306b\u306f\u3001<strong>Workbooks \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u3059\u3079\u3066\u306e\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u3092\u53c2\u7167\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>Workbooks<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u7279\u5b9a\u306e\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u3092\u53c2\u7167\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>Workbooks<\/strong>[.<strong>Index<\/strong> ] ( <em>index<\/em> )<\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Application \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li><strong>Item \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306a\u306e\u3067\u7701\u7565\u53ef\u80fd\u3067\u3059\u3002<\/li>\n<li>index&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7\u307e\u305f\u306f\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u306e\u540d\u524d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n\t\u3000\uff08\u4f8b\uff09<br \/>\n\t\u3000\u3000Workbooks.Item(1)<br \/>\n\t\u3000\u3000Workbooks(&#8220;Test.xlsx&#8221;)<\/li>\n<\/ul><\/div>\n<br \/>\n<p class=\"caution4\">\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7\u306f\u3001\u30d6\u30c3\u30af\u3092\u958b\u3044\u305f\u9806\u306b\u30011,2,3,&#8230; \u3068\u756a\u53f7\u304c\u632f\u3089\u308c\u307e\u3059\u3002<\/p>\n<p class=\"caution4\">\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u306e\u540d\u524d\u3092\u53d6\u5f97\u30fb\u8a2d\u5b9a\u3059\u308b\u306b\u306f\uff1f<br \/>\n    \u3000\uff08\u4f8b\uff09<br \/>\n    \u3000\u3000Workbooks(1).<strong>Name<\/strong><br \/>\n    \u3000\u3000Workbooks(&#8220;Test.xlsx&#8221;).<strong>Name<\/strong><\/p>\n<\/div>\n<br \/><br \/>\n<h2>\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u53c2\u7167\u3059\u308b<\/h2>\n<div class=\"m30-l\">\n<p>\u73fe\u5728\u958b\u3044\u3066\u3044\u308b\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u53c2\u7167\u3059\u308b\u306b\u306f\u3001<strong>Windows \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u53c2\u7167\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>Windows<\/strong><\/p>\n<p>    <span class=\"red\"><strong>\uff1c\u7279\u5b9a\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u53c2\u7167\uff1e<\/strong><\/span><br \/>\n    <em>object<\/em>.<strong>Windows<\/strong>[.<strong>Index<\/strong> ] ( <em>index<\/em> )<\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Application \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span> \u307e\u305f\u306f\u3001<strong>Workbook \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li><strong>Item \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u30d7\u30ed\u30d1\u30c6\u30a3\u306a\u306e\u3067\u7701\u7565\u53ef\u80fd\u3067\u3059\u3002<\/li>\n<li>index&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7\u307e\u305f\u306f\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u306e\u540d\u524d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n\t\u3000\uff08\u4f8b\uff09<br \/>\n\t\u3000\u3000Windows.Item(1)<br \/>\n\t\u3000\u3000Windows(&#8220;Test.xlsx&#8221;)<\/li>\n<\/ul><\/div>\n<br \/>\n<p class=\"caution4\">\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7\u306f\u3001\u4e00\u756a\u624b\u524d\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u304b\u3089\u9806\u306b\u30011,2,3,&#8230; \u3068\u756a\u53f7\u304c\u632f\u3089\u308c\u307e\u3059\u3002\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u4f4d\u7f6e\u304c\u5909\u308f\u308b\u305f\u3073\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7\u306f\u5909\u5316\u3057\u307e\u3059\u3002<\/p>\n<p class=\"caution4\">\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u306e\u540d\u524d\u3092\u53d6\u5f97\u30fb\u8a2d\u5b9a\u3059\u308b\u306b\u306f\uff1f<br \/>\n    \u3000\uff08\u4f8b\uff09<br \/>\n    \u3000\u3000Windows(1).<strong>Caption<\/strong><br \/>\n    \u3000\u3000Windows(&#8220;Test.xlsx&#8221;).<strong>Caption<\/strong><\/p>\n<p class=\"caution4\">\u5bfe\u8c61\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u3001<strong>Application \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong> \u306e\u5834\u5408\u3001\u958b\u3044\u3066\u3044\u308b\u5168\u3066\u306e\u30a6\u30a4\u30f3\u30c9\u30a6\u304c\u542b\u307e\u308c\u307e\u3059\u3002<strong>Workbook \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong> \u306e\u5834\u5408\u3001\u305d\u306e\u30d6\u30c3\u30af\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u307f\u542b\u307e\u308c\u307e\u3059\u3002<\/p>\n<\/div>\n<br \/><br \/>\n<h2>\u30de\u30af\u30ed\u3092\u5b9f\u884c\u4e2d\u306e\u30d6\u30c3\u30af\u3092\u53c2\u7167\u3059\u308b<\/h2>\n<div class=\"m30-l\">\n<p>\u73fe\u5728\u5b9f\u884c\u4e2d\u306e\u30de\u30af\u30ed\u304c\u8a18\u8ff0\u3055\u308c\u3066\u3044\u308b\u30d6\u30c3\u30af\u3092\u53c2\u7167\u3059\u308b\u306b\u306f\u3001<strong>ThisWorkbook \u30d7\u30ed\u30d1\u30c6\u30a3<\/strong> \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>object<\/em>.<strong>ThisWorkbook<\/strong><\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h4>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Application \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span> \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul><\/div>\n<br \/>\n<p class=\"caution4\">\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7\u306f\u3001\u4e00\u756a\u624b\u524d\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u304b\u3089\u9806\u306b\u30011,2,3,&#8230; \u3068\u756a\u53f7\u304c\u632f\u3089\u308c\u307e\u3059\u3002\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u4f4d\u7f6e\u304c\u5909\u308f\u308b\u305f\u3073\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u756a\u53f7\u306f\u5909\u5316\u3057\u307e\u3059\u3002<\/p>\n<p class=\"caution4\">\u30de\u30af\u30ed\u5b9f\u884c\u4e2d\u306e\u30d6\u30c3\u30af\u306e\u540d\u524d\u3092\u53d6\u5f97\u30fb\u8a2d\u5b9a\u3059\u308b\u306b\u306f\uff1f<br \/>\n    \u3000\uff08\u4f8b\uff09<br \/>\n    \u3000\u3000ThisWorkbooks.<strong>Name<\/strong><\/p>\n<\/div>\n<br \/><br \/>\n<h2>ActiveWorkbook, Workbooks, Windows, ThisWorkbook \u30d7\u30ed\u30d1\u30c6\u30a3 \u4f7f\u7528\u4f8b<\/h2>\n<div class=\"m30-l\">\n<h3 id=\"vba_sample\">\u30b5\u30f3\u30d7\u30ebVBA\u30bd\u30fc\u30b9 1<\/h3>\n<pre class=\"lang:vb mark:0 decode:true \" title=\"ActiveWorkbook, Workbooks, Windows, ThisWorkbook \u30d7\u30ed\u30d1\u30c6\u30a3 \u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample_Book()\r\n\r\n\r\n    Dim myStr As String\r\n    \r\n    'ActiveWorkbook\uff08\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30d6\u30c3\u30af\uff09\u3001Workbooks(1)\uff08\u6700\u521d\u306b\u958b\u3044\u305f\u30d6\u30c3\u30af\uff09\u3001\r\n    'Windows(1)\uff08\u6700\u3082\u624b\u524d\u306b\u3042\u308b\u30d6\u30c3\u30af\uff09\u3001ThisWorkbook\uff08\u30de\u30af\u30ed\u5b9f\u884c\u4e2d\u306e\u30d6\u30c3\u30af\uff09\r\n    \r\n    myStr = \"ActiveWorkbook\uff1a\" & vbTab & ActiveWorkbook.Name & vbCrLf & _\r\n            \"Workbooks(1)\uff1a\" & vbTab & Workbooks(1).Name & vbCrLf & _\r\n            \"Windows(1)\uff1a\" & vbTab & Windows(1).Caption & vbCrLf & _\r\n            \"ThisWorkbook\uff1a\" & vbTab & ThisWorkbook.Name\r\n\r\n    MsgBox myStr\r\n\r\n\r\nEnd Sub\r\n\u3000\r\n  <\/pre>\n<br \/>\n<h3>\u5b9f\u884c\u7d50\u679c<\/h3>\n<p><a href=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/refworkbookwindow01.jpg?ssl=1\" rel=\"lightbox[3798]\"><img loading=\"lazy\" src=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/refworkbookwindow01.jpg?resize=580%2C306&#038;ssl=1\" alt=\"\u30d6\u30c3\u30af\u53c2\u7167 \u4f7f\u7528\u4f8b\" width=\"580\" height=\"306\" class=\"alignnone size-large wp-image-3801\" srcset=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/refworkbookwindow01.jpg?resize=580%2C306&amp;ssl=1 580w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/refworkbookwindow01.jpg?resize=400%2C211&amp;ssl=1 400w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/refworkbookwindow01.jpg?w=781&amp;ssl=1 781w\" sizes=\"(max-width: 580px) 100vw, 580px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/>\n","protected":false},"excerpt":{"rendered":"<p>\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u3092\u53c2\u7167 \u73fe\u5728\u4f7f\u7528\u4e2d\u306e\u30ef\u30fc\u30af\u30d6\u30c3\u30af\u3001\u8907\u6570\u3042\u308b\u5834\u5408\u306f\u4e00\u756a\u624b\u524d &#8230; <\/p>\n","protected":false},"author":1,"featured_media":3845,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[357],"tags":[63,38,360],"jetpack_featured_media_url":"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/09\/refworkbookwindow01-580x3061.jpg?fit=580%2C306&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4Ye9i-Zg","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3798"}],"collection":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/comments?post=3798"}],"version-history":[{"count":4,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3798\/revisions"}],"predecessor-version":[{"id":3844,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/3798\/revisions\/3844"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/3845"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=3798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=3798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=3798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}