View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Silly Problem with Variable

Try using a range variable, and then

Set Acell = ActiveCell

You can step your code using F8. You can add a break at a particular line,
select the line and F9, and then start single stepping from there on.
--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"pikapika13" wrote
in message ...

I'm new to VBA.
I'm passing a value to "Acell":

Acell = ActiveCell


However, the following code does not work:
ActiveSheet.PivotTables("PivotTable10").PivotField s("utcid")
PivotItems(Acell).Visible = False

But when I manually put in "37" (in quotes), it works. Please help.

BTW, is there a way to follow your code step by step? similar to the
formula auditing tool in Excel?

Thanks in advance to people in this forum. I learn a lot more from
here than any other book/website.


--
pikapika13
------------------------------------------------------------------------
pikapika13's Profile:

http://www.excelforum.com/member.php...o&userid=10892
View this thread: http://www.excelforum.com/showthread...hreadid=528606