Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding/Removing Rows Automatically. GEM Excel Discussion (Misc queries) 1 March 20th 09 12:50 AM
Automatically removing hyphens from ID# or SSN. FARAZ QURESHI Excel Discussion (Misc queries) 8 February 2nd 07 11:35 PM
Removing Non-Numeric Characters - Automatically - How? emerald Excel Discussion (Misc queries) 6 April 4th 06 08:03 PM
Removing focus from a Modeless Form? Ian Chappel Excel Programming 2 May 1st 04 07:54 PM
Removing a user form with code KimberlyC Excel Programming 1 January 8th 04 11:55 PM


All times are GMT +1. The time now is 04:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"