Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing a user form with code
Hi
I have a worksheet that has a user form with some code behind the form. Is it possible to run code from an addin worksheet that will remove that user form and it's code? Any help is greatly appreciated!! Thanks, Kimberly |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing a user form with code
Hi Kimberly,
Something like this should do it: With ActiveWorkbook.VBProject .VBComponents.Remove .VBComponents("UserForm1") End With You may have to modify your security settings via Tools | Macro | Security, Trusted Sources tab, "Trust access to Visual Basic project" for it to work at runtime. -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] KimberlyC wrote: Hi I have a worksheet that has a user form with some code behind the form. Is it possible to run code from an addin worksheet that will remove that user form and it's code? Any help is greatly appreciated!! Thanks, Kimberly |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving & Removing VB Code from WB | Excel Worksheet Functions | |||
How do I fill a cell in a user form from a selection on same form? | Excel Discussion (Misc queries) | |||
User Form Code | New Users to Excel | |||
Automatically including the Form and Code in all the user file | Excel Programming | |||
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form | Excel Programming |