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

change format of number on trend by vba Options · View
chautran123
#1 Posted : Friday, May 21, 2010 4:44:34 AM
Rank: Newbie
Groups: Member

Joined: 5/19/2010
Posts: 8
Location: hanoi
i'm finding the way to change the format of number on trend by vba.
i have try
Code:

Sub format_trend()
Dim trend_format As TrendFormat
Set trend_format = ThisDisplay.Trend.GetFormat
trend_format.showvalue = true /false
ThisDisplay.Trend.SetFormat trend_format
End Sub

but it only show and hide value not change the format of value.
could you help me.
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.
Michael
#2 Posted : Friday, May 21, 2010 1:42:20 PM
Rank: Advanced Member
Groups: Member

Joined: 12/3/2009
Posts: 71
Location: Germany/Pennsylvania
Hi,

Try this

Dim tr As Trend
Set tr = ThisDisplay.Trend1
tr.CurrentTrace = 1
tr.ScaleFormat = "0.0"


Greetings to Hanoi (I have to go back there once)
Michael
chautran123
#3 Posted : Saturday, May 22, 2010 4:46:41 AM
Rank: Newbie
Groups: Member

Joined: 5/19/2010
Posts: 8
Location: hanoi
thank for your help, i have try your code but it show:"Object doesn't support this property or method"
Ha Noi warmly welcome you.
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.