Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm new here and have a problem with my macro:
// First of all, i'm giving the value throw the input box and select other sheet in my application
Sub ChooseValue
Set q = ActiveDocument
q.ClearAll (false)
Set f = q.Fields("Obiekt CO_nr")
x = inputbox ("Enter product")
f.Select(x)
set s = q.Sheets("Analizator Typów Sprzedaży")
s.Activate
//now i have a problem:
I want to run chart with ID "CH171" with this selected value but chart is activating only when button "Wn" is choosed (please see the image attached) - so only if condition (vWn and vPor_okresow=0) is fullfilled.
vWn = -SubStringCount (concat (PrzekrojeID,'|'),1)*(GetSelectedCount(Przekroje)>0)
vPor_okresow=0
How can i activate the chart? How can i enforce chart to show this one specific value?
I have already tried to use code below:
set v = ActiveDocument.Variables("vWn")
v.SetContent "1",true
But it doesnt work...
Thank you all for your support.
Best Regards
Jacek Antek
You set with "1" a string-value, try it without the quotes.
- Marcus
Hi Marcus,
thank you for your answer!
I did this, problem was... different alternative state on the second sheet and macro couldnt work around this.
Best Regards,
Jacek Antek.