Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Easy macro issue (I think)
Replace lines currently in macro.
Cheers, -- AP "punter" a écrit dans le message de news: ... 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 |
Display Modes | |
|
|
Similar Threads | ||||
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) |