pivot table
hi,
dos it even matter..especially if i cant even get the following to work:
sheets("sheet1").select
with activesheet.pivottables("pivottable3").pivotfields ("fac")
..pivotitems("SSS").visible = true
end with
"JRForm" wrote:
geebee,
Can you post the code from your routine?
"geebee" wrote:
hi,
its something wrong somewhere. i even changed the code to the following:
with activesheet.pivottables("pivottable3").pivotfields ("fac")
.pivotitems("SSS").visible = true
but i am still getting the same error message.
i am running out of idea on this one.
"JRForm" wrote:
geebee,
Did you try typing the value and then running your code? Are you copying a
large amount of data or just the value for g3? If it is just the one value
then create a variable to hold the value and then
<to copy MyValue = Trim(ActiveCell)
<Paste Activecell=MyValue
"geebee" wrote:
yes... the data is being pasted from somewhere else. it is a result of:
selection.pastespecial paste:=excelvalues, operation:=xlnone,
skipblanks:=true, transpose:=false
i am not sure what to do now...
geebee
"JRForm" wrote:
geebee,
No you should not. I tested your code and could only get the error when I
put quotes around data in cell g3. How is the value being populated in
g3-typing-pasting from somewhere else?
"geebee" wrote:
hi,
no i do not. should i?
geebee
"JRForm" wrote:
geebee,
Do you have quotation marks around the value in g3?
"geebee" wrote:
hi,
i have the following code:
e = sheets("sheet1").range("g3").value
msgbox e
with sheets("sheet1").pivottables("pivottable3").pivotf ields("FAC")
.pivotitems(e).visible = true
end with
but i am getting a runtime error 1004: unable to get the pivotitems property
ofthe pivotfield class.
i made sure that the value to be made visible is true. and even recorded a
macro with me checking the item to make it visible, to compare my code to
that. but i dont understand why this is not working.
in this case, the item to be made wisible is WBO
thanks in advance,
geebee
|