My file .pdi have a vba with fuction Display_Open() and i need this pdi close after that.
So i did this....
Dim pdi As Application
But did't work.
You can call the ThisDisplay.Save in the "BeforeClose" event for each PDI and then call Application.Quit to close the ProcessBook application.
Could you elaborate on what you're trying to accomplish?
In your code above, you dimension pdi as Application. However "save" isn't an available method for the application object. You can save and close the display object, though, which is encapsulated in the application object. So, something like this would be correct from a syntax point of view:
Private Sub Display_Open()
ThisDisplay.Close(true) 'True will save the PDI
However, you wouldn't want to run this because it would close your display each time you try to open it (before you can do anything with it).
No problem, this code is just test.
Your vba didn't work too.
Close the display but the program was open. I need close all. This i fiz using Application.Quit
Now i need save before close, how??
Retrieving data ...