Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivot table
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivot table
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivot table
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivot table
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivot table
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 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivot table
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 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivot table
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 |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivot table
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 |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
pivot table
geebee,
I think so. I can get the code below to work without any issues. But I am typing in the data, changing the name of the pivottalble to pivottable3 and it works. However, it is up to you.. "geebee" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to create pivot table from existing pivot table in excel 2007 | Excel Discussion (Misc queries) | |||
Filter lines with Pivot table and non pivot table columns | Charts and Charting in Excel | |||
Filter lines with Pivot table and non Pivot table columns | Excel Discussion (Misc queries) | |||
Filter lines containing pivot table and non pivot table data | Excel Worksheet Functions | |||
Help required with setting up a pivot table with the source on sheet1 to have the pivot table created on sheet called "report" | Excel Programming |