Thank you for the reply. I read the post you suggested but didn't find the answer. I want to embed a excel worksheet in an added PI process book display and then manipulate the worksheet to input data. Actually, I didn't receive any training about PI process book. Now I am learning by myself.
My code is:
Code:
Dim docs As Displays
Set docs = Application.Displays
docs.Add ("newdisplay")Dim docs As Displays
Set docs = Application.Displays
docs.Add ("newdisplay")
Dim oleObj As OLEObject
Set oleObj = ThisDisplay.OLEObjects.Add(classtype:="excel.application.workbook", Filename:="sheet", link:=False, displayasicon:=False, Left:=Left, Top:=Top, Width:=Width, Height:=Height)
The code does not work. Can anyone help me to check it?