{"id":4691,"date":"2015-12-29T08:36:22","date_gmt":"2015-12-28T23:36:22","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=4691"},"modified":"2015-12-29T08:36:22","modified_gmt":"2015-12-28T23:36:22","slug":"funceof","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/funceof\/","title":{"rendered":"EOF \u95a2\u6570"},"content":{"rendered":"<h2>EOF \u95a2\u6570<\/h2>\n<div class=\"m30-l\">\n<p><strong>Open \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8<\/strong> \u3092<strong>\u30e9\u30f3\u30c0\u30e0\u30a2\u30af\u30bb\u30b9\u30e2\u30fc\u30c9\uff08Random\uff09<\/strong>\u307e\u305f\u306f<strong>\u30b7\u30fc\u30b1\u30f3\u30b7\u30e3\u30eb\u5165\u529b\u30e2\u30fc\u30c9\uff08Input\uff09<\/strong>\u3067\u958b\u3044\u305f\u30d5\u30a1\u30a4\u30eb\u3067\u3001\u8aad\u307f\u8fbc\u307f\u4f4d\u7f6e\u304c\u672b\u5c3e\u306b\u5230\u9054\u3057\u305f\u3068\u304d\u3001<strong>True<\/strong> \u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>result<\/em> = <strong>EOF<\/strong> ( <em>filenumber<\/em> )<\/p><\/div>\n<br \/>\n<h4>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h3>\n<div class=\"m30-l\">\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>filenumber&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;<strong>Open \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8<\/strong> \u3067\u3001\u5272\u308a\u5f53\u3066\u3089\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u756a\u53f7\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<li>result&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u30d5\u30a1\u30a4\u30eb\u5185\u306e\u8aad\u307f\u8fbc\u307f\u4f4d\u7f6e\u304c\u672b\u5c3e\u306b\u5230\u9054\u3059\u308b\u307e\u3067\u306e\u9593\u306f\u3001<strong>False<\/strong>\u3001\u672b\u5c3e\u306b\u5230\u9054\u3059\u308b\u3068 <strong>True<\/strong>\u3002<\/li>\n<\/ul>\n<br \/>\n<p class=\"caution4\"><strong>Open \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8<\/strong>\u3001<strong>\u30e9\u30f3\u30c0\u30e0\u30a2\u30af\u30bb\u30b9\u30e2\u30fc\u30c9\uff08Random\uff09<\/strong>\u3001<strong>\u30b7\u30fc\u30b1\u30f3\u30b7\u30e3\u30eb\u5165\u529b\u30e2\u30fc\u30c9\uff08Input\uff09<\/strong> \u7b49\u306b\u95a2\u3057\u3066\u306e\u8a73\u7d30\u306f\u3001<a href=\"https:\/\/excelwork.info\/excel\/textopenclose\/\">\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\uff08Open \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u30fbClose \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\uff09<\/a> \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<\/p><\/div>\n<\/div>\n<br \/><br \/>\n<h2>EOF \u95a2\u6570 \u4f7f\u7528\u4f8b<\/h2>\n<div class=\"m30-l\">\n<h3 id=\"vba_sample\">\u30b5\u30f3\u30d7\u30ebVBA\u30bd\u30fc\u30b9<\/h3>\n<pre class=\"lang:vb mark:0 decode:true \" title=\"EOF \u95a2\u6570 \u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample_EOF()\r\n\r\n    Dim FileName As String\r\n    Dim FileNumber As Integer\r\n    Dim buf(2)\r\n    Dim str As String\r\n    \r\n    FileName = \"C:\\Documents\\user01.txt\"\r\n    FileNumber = FreeFile\r\n    \r\n    Open FileName For Input As #FileNumber\r\n    \r\n        Do Until EOF(FileNumber)\r\n        \r\n            Input #FileNumber, buf(0), buf(1), buf(2)\r\n            str = str & buf(0) & vbTab & buf(1) & vbTab & buf(2) & vbCrLf\r\n        \r\n        Loop\r\n    \r\n    Close #FileNumber\r\n        \r\n    MsgBox str\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:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/12\/func_eof01a.jpg?ssl=1\" rel=\"lightbox[4691]\"><img loading=\"lazy\" src=\"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/12\/func_eof01a.jpg?resize=237%2C260&#038;ssl=1\" alt=\"EOF \u95a2\u6570\" width=\"237\" height=\"260\" class=\"alignnone size-full wp-image-4694\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/><br \/>\n","protected":false},"excerpt":{"rendered":"<p>EOF \u95a2\u6570 Open \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8 \u3092\u30e9\u30f3\u30c0\u30e0\u30a2\u30af\u30bb\u30b9\u30e2\u30fc\u30c9\uff08Random\uff09 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":4694,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[675],"tags":[734,693,63,38],"jetpack_featured_media_url":"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/12\/func_eof01a.jpg?fit=237%2C260&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/s4Ye9i-funceof","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/4691"}],"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=4691"}],"version-history":[{"count":8,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/4691\/revisions"}],"predecessor-version":[{"id":4767,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/4691\/revisions\/4767"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/4694"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=4691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=4691"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=4691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}