Excel VBA Referencing to InkPicture on worksheet

1.2k views Asked by At

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 :)

1

There are 1 answers

1
PetLahev On BEST ANSWER

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)