Search code examples
vbaexcelreferencemicrosoft-ink

Excel VBA Referencing to InkPicture on worksheet


I have completed a few fairly simple Excel & VBA projects but I am quite new to OLEObjects (noob!). After some research I have managed to place InkPicture on Excel worksheet ("Sheet1") using VBA (code below)

ActiveSheet.OLEObjects.Add(ClassType:="msinkaut.InkPicture.1", Link:=False, DisplayAsIcon:=False, Left:=ActiveCell.Left, Top:=ActiveCell.Top, Width:=240, Height:=70).Select

Does anyone know how to access the (embedded) InkPicture properties and methods using VBA?

Many thanks :)


Solution

  • Try this

    Dim yourObject As OLEObject
    Set yourObject = ActiveSheet.OLEObjects.Add(ClassType:="msinkaut.InkPicture.1", Link:=False, DisplayAsIcon:=False, Left:=ActiveCell.Left, Top:=ActiveCell.Top, Width:=240, Height:=70)