|
そのページにある6個のチャートを、縦に並べて挿入するなら
Sub MyPic_INS()
Dim i As Long, j As Long
Dim Lp As Single, Tp As Single
Dim Wp As Single, Hp As Single
Dim CdAry As Variant, NmAry As Variant
Const URLTop As String = _
"http://211.9.244.17/sw/mei/13/images/d"
CdAry = Array(1301, 1331, 1332, 1334, 1377, 1379)
NmAry = Array("極洋", "ニチロ", "日水", "マルハ本社", _
"サカタタネ", "ホクト")
Application.ScreenUpdating = False: j = 1
Range("A:A").ClearContents
With Range("B1:F13")
Lp = .Left: Wp = .Width: Hp = .Height
End With
With ActiveSheet.Pictures
If .Count > 0 Then .Delete
For i = 0 To UBound(CdAry)
Cells(j, 1).Value = NmAry(i)
With .Insert(URLTop & CdAry(i) & "_t.gif")
.Left = Lp: .Top = Rows(j).Top
.Width = Wp: .Height = Hp
End With
j = j + 14
Next i
End With
Columns("A:A").AutoFit
Application.ScreenUpdating = True
End Sub
空白シートを開いて実行してみて下さい。
定数 URLTop の先頭4文字は半角に変換して下さい。
|
|