+ Reply to Thread
Results 1 to 2 of 2

Removing a Form from VB Automatically

  1. #1
    Trey via OfficeKB.com
    Guest

    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("UserForm1")
    ActiveWorkbook.VBProject.VBComponents.Remove VBComp

    --
    Message posted via OfficeKB.com
    http://www.officekb.com/Uwe/Forums.a...mming/200512/1

  2. #2
    Registered User
    Join Date
    05-26-2005
    Posts
    9
    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!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1