Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
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
Keep sheet from deleting contents Richard Excel Worksheet Functions 1 March 14th 08 03:24 AM
Deleting a sheet P. Dileepan[_2_] Excel Programming 3 April 12th 04 10:34 AM
Deleting Sheet Tommi[_2_] Excel Programming 3 December 18th 03 05:28 PM
Deleting Many Cells on a Sheet Jim[_34_] Excel Programming 2 October 30th 03 04:38 PM
Deleting a Sheet Abdul Salam Excel Programming 1 July 29th 03 12:43 AM


All times are GMT +1. The time now is 10:52 AM.

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"