View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel[_800_] joel[_800_] is offline
external usenet poster
 
Posts: 1
Default Novice question: I cannot get the immediate window to work


the code is not written very well. First, don't use "activecell". for
this code to work you need 3 things to happen

1) You need to have a pivot table
2) You need to have the sheet with the pivot table as the active sheet
3) You need to have the active cell on the worksheet select a cell
inside the pivot table.

The line should be like this

from
Set pt=ActiveCell.Pivottable
to

Set pt = sheets("sheet1").Range("A1").Pivottable


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=187304

http://www.thecodecage.com/forumz/chat.php