Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting sheet
I have a macro set up in Excel that imports data from
other Excel files and then edits the data accordingly in various sheets. There are 20 sheets in this Excel file. If I need to edit the Excel file so that I delete a sheet or add a sheet, what is the best way to edit the macro in VBA? For example, is there any way to search for all of the actions in the programming that pertain to a certain sheet and automatically delete them? Thanks:) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting sheet
Do you already know the name of the sheet or sheets you want to delete? As for the adding of sheets. Sheets.Add Then i usually name them immediately after i create them. ActiveSheet.Name = "Name of Sheet -- SCSA2 ----------------------------------------------------------------------- SCSA25's Profile: http://www.excelforum.com/member.php...fo&userid=1510 View this thread: http://www.excelforum.com/showthread.php?threadid=26738 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting sheet
Yet I already know the names of the sheets I will need to
delete, but by just deleting the sheet, it does not delete the code that applies to that sheet, so an error appears. Should I maybe set the macro up in a different way??? Also, the direction that you gave to add a new sheet...how do I get the macro to import a file and do the proper text editing, etc. like I have set up for the other sheets? -----Original Message----- Do you already know the name of the sheet or sheets you want to delete? As for the adding of sheets. Sheets.Add Then i usually name them immediately after i create them. ActiveSheet.Name = "Name of Sheet" -- SCSA25 ---------------------------------------------------------- -------------- SCSA25's Profile: http://www.excelforum.com/member.php? action=getinfo&userid=15106 View this thread: http://www.excelforum.com/showthread...hreadid=267386 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Keep sheet from deleting contents | Excel Worksheet Functions | |||
Deleting a sheet | Excel Programming | |||
Deleting Sheet | Excel Programming | |||
Deleting Many Cells on a Sheet | Excel Programming | |||
Deleting a Sheet | Excel Programming |