Hi, pretty new to vba and im getting stuck on this problem.
We have a lot of trends that have different background colours, line colours etc and I want to change them to a standard set of colours. I was thinkig if I make a button and then open each trend individually I would be able to do this.
I was thinking of changing this to suit my needs (found on OSI KB Articles) but it doesnt like the "tcolor = TrendBackgroundColor()
Quote:
Public Sub Prevtrend()
Dim tcolor As Long
tcolor = Trend.BackgroundColor()
Trend.BackgroundColor = RGB(128, 128, 128)
ThisDisplay.PrintPreview
Trend.BackgroundColor = tcolor
End Sub
I also found this code off this forum, but when I click my button, it opens the display the macros is run from and changes that instead of the display I had originally opened.
Quote:
Public Sub TrendColors()
Dim TheTrend As Trend
Set TheTrend = ThisDisplay.Symbols("Trend1")
Dim TF As TrendFormat
Set TF = TheTrend.GetFormat
TF.Elements(pbBackGround).Color = RGB(81, 81, 81)
Any help would be greatly appreciated (using 3.0.15.2 if that helps any)