Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto delete all VB forms in current excel doc

Not sure if this will be possible, but I'm trying to put
together some code which removes all Vis Basic Forms from
the current excel document without having to go into the
visual basic editor.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Auto delete all VB forms in current excel doc

Look at Chip Pearson's site
http://ww.cpearson.com/excel/vbe.htm

--
Regards,
Tom Ogilvy


"Martin" wrote in message
...
Not sure if this will be possible, but I'm trying to put
together some code which removes all Vis Basic Forms from
the current excel document without having to go into the
visual basic editor.

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Auto delete all VB forms in current excel doc

Martin,

Set a reference in VBA to the MS VBA Extensibility library, and then use the
following code:

Dim VBComp As VBIDE.VBComponent
With ActiveWorkbook.VBProject
For Each VBComp In .VBComponents
If VBComp.Type = vbext_ct_MSForm Then
.VBComponents.Remove VBComp
End If
Next VBComp
End With


See www.cpearson.com/excel/vbe.htm for more details.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com


"Martin" wrote in message
...
Not sure if this will be possible, but I'm trying to put
together some code which removes all Vis Basic Forms from
the current excel document without having to go into the
visual basic editor.

Thanks



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
How to make excel auto fill in date and current time [email protected] Excel Discussion (Misc queries) 6 April 3rd 23 04:25 PM
Is there a COMMAND to stop a current process in Excel(Copy/Delete/ Stegra Excel Discussion (Misc queries) 1 January 13th 09 02:52 PM
Auto reply in excel forms Leona Excel Discussion (Misc queries) 3 January 3rd 08 07:57 PM
Delete Forms CommandButton on Worksheet Jim May Excel Discussion (Misc queries) 7 June 5th 06 10:29 PM
Excel :: Creating Entry Forms that auto load a workbook Dave Peterson[_3_] Excel Programming 0 July 25th 03 05:19 AM


All times are GMT +1. The time now is 03:15 AM.

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"