Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Issue - Run time error 1004 | Excel Discussion (Misc queries) | |||
Make Alignment options under format cells available as shortcut | Excel Discussion (Misc queries) | |||
Help with macro looping and color query function | Excel Discussion (Misc queries) | |||
Issuing macro in workbook from separate workbook | Excel Discussion (Misc queries) | |||
Macro and If Statement | Excel Discussion (Misc queries) |