{"id":380,"date":"2017-06-25T02:07:28","date_gmt":"2017-06-25T02:07:28","guid":{"rendered":"http:\/\/mio-web.net\/pcsupport\/?p=380"},"modified":"2017-06-25T02:08:08","modified_gmt":"2017-06-25T02:08:08","slug":"access-%e3%81%8b%e3%82%89excel%e3%83%96%e3%83%83%e3%82%af%e9%96%93%e3%81%ae%e3%82%b3%e3%83%94%e3%83%bc%e6%93%8d%e4%bd%9c%ef%bc%88%e3%82%af%e3%83%aa%e3%83%83%e3%83%97%e3%83%9c%e3%83%bc%e3%83%89","status":"publish","type":"post","link":"https:\/\/mio-web.net\/pcsupport\/archives\/380\/","title":{"rendered":"ACCESS \u304b\u3089EXCEL\u30d6\u30c3\u30af\u9593\u306e\u30b3\u30d4\u30fc\u64cd\u4f5c\uff08\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u554f\u984c\u3042\u308a\uff09"},"content":{"rendered":"<p>ACCESS\u304b\u3089VBA\u3067\u30a8\u30af\u30bb\u30eb\u3092\u64cd\u4f5c\u3059\u308b\u3068\u304d\u306b\u3001\u305d\u308c\u305e\u308c\u306e\u30d6\u30c3\u30af\u3092\u958b\u304f\u5fc5\u8981\u304c\u3042\u308a\u3001\u305d\u3053\u3067COPY \u3068\u3000PASTESPECIAL \u30e1\u30bd\u30c3\u30c9\u3092\u7528\u3044\u308b\u3002\u305d\u308c\u3092\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3059\u308b\u5834\u5408\u3001\u300c\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u5927\u304d\u306a\u30c7\u30fc\u30bf\u304c\u30fb\u30fb\u30fb\u300d\u3068\u3044\u3046\u65e8\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u5fc5\u305a\u51fa\u3066\u4e2d\u65ad\u3055\u308c\u308b\u306e\u3067\u3001\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u3092\u6bce\u56de\u30af\u30ea\u30a2\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<br \/>\n\u305d\u308c\u3092\u5b9f\u73fe\u3057\u3066\u3044\u308b\u306e\u304c\u4e0b\u8a18\u306e\u30bd\u30fc\u30b9\u3068\u306a\u308b\u3002<\/p>\n<p>\u5192\u982d\u306b<br \/>\nPrivate Declare Function OpenClipboard Lib &#8220;user32&#8221; (ByVal hwnd As Long) As Long<br \/>\nPrivate Declare Function EmptyClipboard Lib &#8220;user32&#8221; () As Long<br \/>\nPrivate Declare Function CloseClipboard Lib &#8220;user32&#8221; () As Long<\/p>\n<p>\u6587\u4e2d\u3067<\/p>\n<p>Do Until rs.EOF<br \/>\nfName = rs!\u30d5\u30a1\u30a4\u30eb\u540d<br \/>\nfPath = foName &#038; fName<br \/>\nwksTarget.Cells(2, i) = Left(fName, Len(fName) &#8211; 10)<\/p>\n<p>xls.ScreenUpdating = False<\/p>\n<p>Set wkb2 = Workbooks.Open(fPath)<br \/>\nwkb2.Worksheets(1).Range(&#8220;a1&#8221;).CurrentRegion.Select<br \/>\nSelection.Offset(1).Copy<br \/>\nwksTarget.Cells(4, i).PasteSpecial Paste:=xlPasteValues<\/p>\n<p>&#8216;\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u3092\u7a7a\u306b\u3059\u308b<br \/>\nIf OpenClipboard(ByVal 0&#038;) Then<br \/>\n    Call EmptyClipboard<br \/>\n    Call CloseClipboard<br \/>\nEnd If<\/p>\n<p>wkb2.Close<br \/>\nxls.ScreenUpdating = True<\/p>\n<p>rs.MoveNext<\/p>\n<p>i = i + 2<\/p>\n<p>Loop<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ACCESS\u304b\u3089VBA\u3067\u30a8\u30af\u30bb\u30eb\u3092\u64cd\u4f5c\u3059\u308b\u3068\u304d\u306b\u3001\u305d\u308c\u305e\u308c\u306e\u30d6\u30c3\u30af\u3092\u958b\u304f\u5fc5\u8981\u304c\u3042\u308a\u3001\u305d\u3053\u3067COPY \u3068\u3000PASTESPECIAL \u30e1\u30bd\u30c3\u30c9\u3092\u7528\u3044\u308b\u3002\u305d\u308c\u3092\u7e70\u308a\u8fd4\u3057\u51e6\u7406\u3059\u308b\u5834\u5408\u3001\u300c\u30af\u30ea\u30c3\u30d7\u30dc\u30fc\u30c9\u306b\u5927\u304d\u306a\u30c7\u30fc\u30bf\u304c\u30fb\u30fb\u30fb\u300d\u3068\u3044 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"vkexunit_cta_each_option":"","footnotes":""},"categories":[24],"tags":[],"class_list":["post-380","post","type-post","status-publish","format-standard","hentry","category-access"],"_links":{"self":[{"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/posts\/380","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/comments?post=380"}],"version-history":[{"count":2,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/posts\/380\/revisions"}],"predecessor-version":[{"id":382,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/posts\/380\/revisions\/382"}],"wp:attachment":[{"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/media?parent=380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/categories?post=380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mio-web.net\/pcsupport\/wp-json\/wp\/v2\/tags?post=380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}