View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
punter
 
Posts: n/a
Default Easy macro issue (I think)


Hi,

I'm new to macros but getting pretty good at them. I put together a
macro that does various pivots. The problem arises after it runs the
first pivot (on which all the other data is eventually dumped). When I
wrote the macro the name of the sheet that opened up was Sheet2. When I
run the macro again I get an error if the sheet that is opened is not
named Sheet2. If it is named Sheet2 then it runs perfectly. Below is
the error I get:

Sheets("Sheet2").Select
Sheets("Sheet2").Name = "Summary"

I assume that I need to put something inside the brackets to tell it to
proceed with whatever name the sheet is given once the pivot is run.
Does anyone know what I should do in this case.

Thanks for the help.

Eddie.


--
punter


------------------------------------------------------------------------
punter's Profile: http://www.excelforum.com/member.php...fo&userid=2044
View this thread: http://www.excelforum.com/showthread...hreadid=546440