Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a few comboboxes on a worksheet and when the user saves the worksheet,
a macro removes all the comboboxes. I was digging through the forum to find a way to eliminate the code from a worksheet, but I read a post that said it couldn't be done. Is that true? If it is not true, where can I find code to eliminate code? Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi IT_Roofer,
See Chip Pearson at: Programming To The Visual Basic Editor http://www.cpearson.com/excel/vbe.htm See particularly the section entitled: Deleting A Module From A Workbook but do read Chip's page introduction in full! --- Regards, Norman "IT_roofer" wrote in message ... I have a few comboboxes on a worksheet and when the user saves the worksheet, a macro removes all the comboboxes. I was digging through the forum to find a way to eliminate the code from a worksheet, but I read a post that said it couldn't be done. Is that true? If it is not true, where can I find code to eliminate code? Thanks. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you for your reply. I will dig around on Chip's website, but initially,
the page you pointed me to is not the information I want to find. That page refers to removing/adding code to a MODULE - I want to remove code from a WORKSHEET. Explaination: I have code in the worksheet that monitor calculations and changes to certain values and comboboxes and when the sheet is "saved", it is copied to a new workbook and controls are removed. Well now I would like to apply one more bit of code to remove the worksheet code when it is copied into the new workbook. "Norman Jones" wrote: Hi IT_Roofer, See Chip Pearson at: Programming To The Visual Basic Editor http://www.cpearson.com/excel/vbe.htm See particularly the section entitled: Deleting A Module From A Workbook but do read Chip's page introduction in full! --- Regards, Norman "IT_roofer" wrote in message ... I have a few comboboxes on a worksheet and when the user saves the worksheet, a macro removes all the comboboxes. I was digging through the forum to find a way to eliminate the code from a worksheet, but I read a post that said it couldn't be done. Is that true? If it is not true, where can I find code to eliminate code? Thanks. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can remove the code from a sheet module with code like the following. It
will remove the code behind MySheet. With ThisWorkbook With .VBProject.VBComponents(.Worksheets("MySheet").Cod eName).CodeModule .DeleteLines 1, .CountOfLines End With End With -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting LLC www.cpearson.com (email on the web site) "IT_roofer" wrote in message ... Thank you for your reply. I will dig around on Chip's website, but initially, the page you pointed me to is not the information I want to find. That page refers to removing/adding code to a MODULE - I want to remove code from a WORKSHEET. Explaination: I have code in the worksheet that monitor calculations and changes to certain values and comboboxes and when the sheet is "saved", it is copied to a new workbook and controls are removed. Well now I would like to apply one more bit of code to remove the worksheet code when it is copied into the new workbook. "Norman Jones" wrote: Hi IT_Roofer, See Chip Pearson at: Programming To The Visual Basic Editor http://www.cpearson.com/excel/vbe.htm See particularly the section entitled: Deleting A Module From A Workbook but do read Chip's page introduction in full! --- Regards, Norman "IT_roofer" wrote in message ... I have a few comboboxes on a worksheet and when the user saves the worksheet, a macro removes all the comboboxes. I was digging through the forum to find a way to eliminate the code from a worksheet, but I read a post that said it couldn't be done. Is that true? If it is not true, where can I find code to eliminate code? Thanks. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ignore my other post.
I glanced over it and, of course, as soon as I dug into it like I said I was going to, I now have to eat my words. Thanks again, Norman. "Norman Jones" wrote: Hi IT_Roofer, See Chip Pearson at: Programming To The Visual Basic Editor http://www.cpearson.com/excel/vbe.htm See particularly the section entitled: Deleting A Module From A Workbook but do read Chip's page introduction in full! --- Regards, Norman "IT_roofer" wrote in message ... I have a few comboboxes on a worksheet and when the user saves the worksheet, a macro removes all the comboboxes. I was digging through the forum to find a way to eliminate the code from a worksheet, but I read a post that said it couldn't be done. Is that true? If it is not true, where can I find code to eliminate code? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copied from web page to excel sheet and cant remove from sheet | Excel Worksheet Functions | |||
copied from web page to excel sheet and cant remove from sheet | Excel Worksheet Functions | |||
Inserting a row in sheet A should Insert a row in sheet B, removing a row in Sheet A should remove the corresponding row in sheet B | Excel Programming | |||
Use VB code to remove code in sheet1 | Excel Programming | |||
Remove VBA code | Excel Programming |