Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete a code
Hello
How can I delete a code (same code to all sheets) which is inserted in 50 sheets in an excel file? Delete the code sheet by sheet or there is an alternative way more simple? Thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete a code
I assume you mean VBA code. The more eligant way is not to have added it in the first place. I think you must of had some VBA in a sheet and copied it 50 times and now you don't want to distribute the code with you workbook. Next time only copy the sheet once. Delete the code, then copy it 50 times. ------------------------------- POSTED BEFORE RECEIVING A REPLY AFTER 6 MINUTES OF ORIGINAL POST ------------------------------- I assume you mean VBA code. The more eligant way is not to have added it in the first place. I think you must of had some VBA in a sheet and copied it 50 times and now you don't want to distribute the code with you workbook. Next time only copy the sheet once. Delete the code, then copy it 50 times. You can with a macro add and delete VBA code. See Chip Pearson's website 'Programming In The VBA Editor' (http://www.cpearson.com/Excel/vbe.aspx) -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=176984 Microsoft Office Help |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete a code
All I did is that I copied the code sheet by sheet and now I want to delete
that code from all the sheets. "joel" wrote: I assume you mean VBA code. The more eligant way is not to have added it in the first place. I think you must of had some VBA in a sheet and copied it 50 times and now you don't want to distribute the code with you workbook. Next time only copy the sheet once. Delete the code, then copy it 50 times. ------------------------------- POSTED BEFORE RECEIVING A REPLY AFTER 6 MINUTES OF ORIGINAL POST ------------------------------- I assume you mean VBA code. The more eligant way is not to have added it in the first place. I think you must of had some VBA in a sheet and copied it 50 times and now you don't want to distribute the code with you workbook. Next time only copy the sheet once. Delete the code, then copy it 50 times. You can with a macro add and delete VBA code. See Chip Pearson's website 'Programming In The VBA Editor' (http://www.cpearson.com/Excel/vbe.aspx) -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=176984 Microsoft Office Help . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete a code
th seasies wasy is to manual go to each sheet selecting the sheet in the vba project window and then tyhpe Cntl-A (select all) and press delete. It only should take 2 minutes. You can easily delete all the sheet by selecting all at once and starting from scratch. remove the vba code. Then write a very simple macro to create the sheets for I = 1 to 50 sheets("sheet1").copy after:=sheets(sheets.count) next i -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=176984 Microsoft Office Help |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete a code
On Feb 6, 10:04*pm, joel wrote:
th seasies wasy is to manual go to each sheet selecting the sheet in the vba project window and then tyhpe Cntl-A (select all) and press delete. It only should take 2 minutes. You can easily delete all the sheet by selecting all at once and starting from scratch. remove the vba code. *Then write a very simple macro to create the sheets for I = 1 to 50 sheets("sheet1").copy after:=sheets(sheets.count) next i -- joel ------------------------------------------------------------------------ joel's Profile: 229 View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=176984 Microsoft Office Help You have to use VBIDE class. To get that you will have to add "Microsoft Visual Basic for Applications Extensibility x,xx" . Then you can write a macro to delete the entire code in 2 sec. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Delete code | Excel Programming | |||
Delete Code | Excel Programming | |||
Code to delete a Line in a another code | Excel Programming | |||
VBA code delete code but ask for password and unlock VBA protection | Excel Programming | |||
VBA code to delete VBA code in another Workbook | Excel Programming |