YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

How can I change the showing page of ProcessBook by vba code? Options · View
Jacko
#1 Posted : Friday, August 20, 2010 8:29:32 AM
Rank: Newbie
Groups: Member

Joined: 8/20/2010
Posts: 4
Location: China
Hello,

There are two .PDI files,such as 'A.PDI' & 'B.PDI'.

Please how can I do by vba code,to change the showing page From 'A.PDI' to 'B.PDI'?
Sponsor  
 

OSIsoft vCampus is a subscription-based, online offering that consists of providing everything people need to develop applications on the PI System.
We invite you to take a "tour" of the OSIsoft Virtual Campus - also feel free to consult the FAQ  or contact OSIsoft vCampus for more details.
RJK Solutions
#2 Posted : Friday, August 20, 2010 11:30:49 AM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 617
Location: Cheshire, United Kingdom.
Hello,

If you already have the display open, the calling the "Display.Activate" method will give it focus. If the display is not already open, then opening the display will give it focus, e.g. Application.Display.Open("C:\B.pdi",True).
Principal Consultant
Real-Time Data Management @ Wipro Technologies
Jacko
#3 Posted : Monday, August 23, 2010 5:01:45 AM
Rank: Newbie
Groups: Member

Joined: 8/20/2010
Posts: 4
Location: China
Thanks a lot!
blitzclipse
#4 Posted : Thursday, September 23, 2010 9:29:41 PM
Rank: Member
Groups: Member

Joined: 1/15/2010
Posts: 13
Location: us
The disply open event is great; however, it doesn't close displays. So, you can end up with several displays open at the same time. For this reason, I typically do the following:

Sub overviewdiplayopen()
Dim d1 As Display
Dim a As Display

Set a = ThisDisplay
Set d1 = Application.Displays.Open("C:\B.pdi", True)
a.Close (False)

End Sub
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.