scottadoyle
New Member
- Joined
- Oct 30, 2015
- Messages
- 4
I dynamically create an InkPicture control in the following manner
After creating it and setting its properties such as InkEnabled = True I am able to add strokes (write on it). Once I scroll the control off the page then go back to it I am no longer able to add strokes. Before I scroll off the screen I can change the editingmode property from InkOverlayEditingMode.IOEM_Ink to InkOverlayEditingMode.IOEM_Delete or ...IOEM_Select. This allows me to change between being able to create new strokes, erase the existing strokes or select only but as mentioned earlier once I scroll the control off the screen or move to another sheet and come back I can no longer add ink even though the InkEnabled is set to true and editingmode is set to ...IOEM_Ink.
I am running Excel 2016. When ran in Excel 2010 it does not do this although in 2010 once I set InkEnabled to False I can no longer apply new ink even if I set InkEnabled back to true.
Code:
Set oObject = ActiveSheet.OLEObjects.Add(ClassType:="msinkaut.InkPicture.1", Link:=False, _ DisplayAsIcon:=False, Left:=myCell.Left, Top:=myCell.Top, _
Width:=myCell.Width - 1, Height:=myCell.Height - 1)
After creating it and setting its properties such as InkEnabled = True I am able to add strokes (write on it). Once I scroll the control off the page then go back to it I am no longer able to add strokes. Before I scroll off the screen I can change the editingmode property from InkOverlayEditingMode.IOEM_Ink to InkOverlayEditingMode.IOEM_Delete or ...IOEM_Select. This allows me to change between being able to create new strokes, erase the existing strokes or select only but as mentioned earlier once I scroll the control off the screen or move to another sheet and come back I can no longer add ink even though the InkEnabled is set to true and editingmode is set to ...IOEM_Ink.
I am running Excel 2016. When ran in Excel 2010 it does not do this although in 2010 once I set InkEnabled to False I can no longer apply new ink even if I set InkEnabled back to true.