![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: May 2002
Posts: 251
|
Hi,
Is there any way that when I run macro, it creates a sheet(a) and at the end of maco it delete that sheet. Any Idea? Thanks in advance |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
try recording a macro insert a worksheet then delete that worksheet look at the code and add it to your macro!
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: May 2002
Posts: 251
|
No it does not work.
Sheets.Add Sheets("Sheet10").Select Sheets("Sheet10").Name = "b" Range("F19").Select it always insert Sheet1, Sheet2, and so on. I want to sheet name as "b". becasue I am using that dummy b sheet in my codes, so at the end of maco I want to delete that sheet. so next time when I run macro it should insert sheet b. |
|
|
|
|
|
#4 | |
|
Board Regular
Join Date: Apr 2002
Posts: 112
|
Quote:
Try this instead of the code above. Sheets.Add ActiveSheet.Name = "b" [ This Message was edited by: bergy on 2002-05-16 14:37 ] |
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: May 2002
Posts: 251
|
Thank you very much, It works.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|