advanced help
per page, with , order by , clip by
Results of 1 - 1 of about 71 for ExecuteExcel4Macro 閉じた|開いて|開かず (0.012 sec.)
executeexcel4macro (140), 閉じた (629), 開いて (4904), 開かず (263)
[[20120501083428]]
#score: 14119
@digest: 3a6a4faa178ade6579f949203c69e781
@id: 58753
@mdate: 2012-04-30T23:54:22Z
@size: 1333
@type: text/plain
#keywords: 採取 (15351), retsu (14507), thisbook (7616), 値& (5803), nagasan (5415), 止") (4888), 力禁 (4252), 取し (4042), 列& (3460), executeexcel4macro (2389), 秒程 (1969), を採 (1882), workbook (1558), 考: (1492), savechanges (971), r1c1 (845), 禁止 (678), ファ (653), ル以 (586), screenupdating (539), officetanaka (517), ァイ (506), book1 (459), 開か (440), integer (432), ルデ (426), イル (423), 字列 (392), cells (381), 知識 (322), るフ (293), workbooks (258)
『ファイルを開かないでデータを採取したい』(nagasan)
開いているファイル以外のファイルからデータを採取したくて以下のマクロを作成しました。 Sub test() Dim thisBook As workBook Dim workBook As workBook Dim i As Integer Dim retsu As Integer Application.ScreenUpdating = False For retsu = 2 To 14 Step 14 For i = 8 To 25 Set thisBook = ThisWorkbook If Cells(i, retsu) <> "" Then Set workBook = Workbooks.Open(Cells(2, 2) & Cells(3, retsu) & "¥" & Cells(i, retsu)) Cells(i, retsu + 1).Value = workBook.Worksheets("入力禁止").Cells(47, 19).Value workBook.Close saveChanges:=False Else Cells(i, retsu + 1).Value = "" End If Next i Next retsu Application.ScreenUpdating = True End Sub しかし、いちいちファイルを開いてデータを採取しているためか、 実行するのに30秒程度の時間がかかります。 ExecuteExcel4Macroを使う事までは、ネットで調べられたのですが、 データを採取するファイルのパスやファイル名にセルデータを使用しているため、 私の知識ではうまくいきません。ご教授いただけないでしょうか? ---- 参考:ブックを開かないで読む http://officetanaka.net/excel/vba/tips/tips28.htm MsgBox ExecuteExcel4Macro("'C:¥[Book1.xls]Sheet1'!R1C1") "'C:¥[Book1.xls]Sheet1'!R1C1"は文字列なので文字列&文字列&文字列 の様にできるのでセルの値&セルの値&セルの値にすればよいだけでは ...
https://www.excel.studio-kazu.jp/wiki/kazuwiki/201205/20120501083428.txt - [detail] - similar
PREV NEXT
Powered by Hyper Estraier 1.4.13, with 97056 documents and 608292 words.

訪問者:カウンタValid HTML 4.01 Transitional