Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #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

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


Thank you so much for the quick reply. Should I delete the two lines
currently in the macro and replace them with what you have listed
below? Or are they to be added to the two lines in some way?

Thanks

Eddie


--
punter


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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Issue - Run time error 1004 Matt7102 Excel Discussion (Misc queries) 1 December 22nd 05 12:35 AM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Help with macro looping and color query function kevinm Excel Discussion (Misc queries) 10 May 26th 05 01:25 AM
Issuing macro in workbook from separate workbook Nigel Excel Discussion (Misc queries) 1 May 16th 05 05:46 PM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM


All times are GMT +1. The time now is 06:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"