|
▼SK63 さん:
>▼hoully さん:
追加です、
初期化の後にdを実行するとOKです、
ただし、実行するとイベントが発生しますので、
必要におおじてイベントオン、オフを実行してください
>Public WBK1 As Workbook, WBK2 As Workbook, WBK3 As Workbook
>Public SH1 As Worksheet, SH2 As Worksheet, SH3 As Worksheet
>public strfile as string
>
>Sub 初期化()
>
>Set WBK1 = ThisWorkbook ' 自ブック
>Set SH1 = WBK1.Worksheets("板とチャート")
>
>strfile = ThisWorkbook.Path & "\" & "ティック.xls"
> Workbooks.Open strfile
> Set WBK3 = ActiveWorkbook
> Set ShH2= WBK3.Worksheets(1)
>
>end sub
Sub d()
Dim Z As Variant
Dim GYO As Integer
Dim i As Integer
i = 1
Z = SH2.Cells(1, 17).Resize(6, 1).Value
For GYO = 5 To 45 Step 8
SH1.Cells(GYO, 3) = Z(i, 1)
i = i + 1
Next GYO
End Sub
Sub イベントオン()
Application.EnableEvents = True
Application.ScreenUpdating = True’画面更新オン
End Sub
Sub イベントオフ()
Application.EnableEvents = False
Application.ScreenUpdating = False
End Sub
|
|