跳至主內容

搜尋

搜尋

Assign an object reference to a variable [Solved]

評論

1 條評論

  • Avatar
    Matthew Baker

    Solved using the Set keyword

    Dim graphicItems(3)
    Set graphicItems(0) = Format.Objects("Graphic 1")
    Set graphicItems(1) = Format.Objects("Graphic 2")
    Set graphicItems(2) = Format.Objects("Graphic 3")
    Set graphicItems(3) = Format.Objects("Graphic 4")

    For Each item In graphicItems
        item.Width = 3.5
        item.Height = 3.5
        item.X = 0.0
    Next

    0

登入寫評論。