Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing a Form from VB Automatically
Does anyone know how to remove or delete a from.
I can do this with a module but am having issues with a Form. Here is the syntaxt I use for a module Set VBComp = Workbooks(RollUpProg).VBProject.VBComponents("User Form1") ActiveWorkbook.VBProject.VBComponents.Remove VBComp -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200512/1 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing a Form from VB Automatically
Sub test() Dim x As Object Set x = Application.VBE.ActiveVBProject.VBComponents 'Delete the item which is not required. x.Remove vbcomponent:=x.Item("UserForm1") End Sub It works! -- lotus ------------------------------------------------------------------------ lotus's Profile: http://www.excelforum.com/member.php...o&userid=23759 View this thread: http://www.excelforum.com/showthread...hreadid=493989 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding/Removing Rows Automatically. | Excel Discussion (Misc queries) | |||
Automatically removing hyphens from ID# or SSN. | Excel Discussion (Misc queries) | |||
Removing Non-Numeric Characters - Automatically - How? | Excel Discussion (Misc queries) | |||
Removing focus from a Modeless Form? | Excel Programming | |||
Removing a user form with code | Excel Programming |