Auto Delete or auto remove userForm 
Author Message
 Auto Delete or auto remove userForm

Hi,

We start to use a lot of userform and all of them are attached to the
normal.dot. This file start to become bigger and bigger, so I decide to
export all the Userform in the same directory and import the one that the
user need.
I would like to remove it when is done whith the userform but I'm anable to
fin the way to do that.

to import the file I use the following code :

ActiveDocument.VBProject.VBComponents.Import
(Options.DefaultFilePath(wdUserTemplatesPath) & Application.PathSeparator &
"UserForm.frm")

To remove the Userform, I try

ActiveDocument.VBProject.VBComponents.Remove(UserForm)

But it's dosen't work

Does someone help me ??



Sun, 26 May 2002 03:00:00 GMT  
 Auto Delete or auto remove userForm
Hi Olivier,

- To remove a userform from the activedocument, use:

ActiveDocument.VBProject.VBComponents.Remove _
ActiveDocument.VBProject.VBComponents("UserForm1")

- To remove a userform from the Normal template, use:

NormalTemplate.VBProject.VBComponents.Remove _
NormalTemplate.VBProject.VBComponents("UserForm1")

--
Hope this helps.

Please post any replies to the **newsgroup** so that others in the newsgroup
may contribute or benefit.


| Hi,
|
| We start to use a lot of userform and all of them are attached to the
| normal.dot. This file start to become bigger and bigger, so I decide to
| export all the Userform in the same directory and import the one that the
| user need.
| I would like to remove it when is done whith the userform but I'm anable
to
| fin the way to do that.
|
| to import the file I use the following code :
|
| ActiveDocument.VBProject.VBComponents.Import
| (Options.DefaultFilePath(wdUserTemplatesPath) & Application.PathSeparator
&
| "UserForm.frm")
|
| To remove the Userform, I try
|
| ActiveDocument.VBProject.VBComponents.Remove(UserForm)
|
| But it's dosen't work
|
| Does someone help me ??
|
|



Mon, 27 May 2002 03:00:00 GMT  
 Auto Delete or auto remove userForm
Thanks ibby
It's exacly what I needed
OH


Quote:
> Hi Olivier,

> - To remove a userform from the activedocument, use:

> ActiveDocument.VBProject.VBComponents.Remove _
> ActiveDocument.VBProject.VBComponents("UserForm1")

> - To remove a userform from the Normal template, use:

> NormalTemplate.VBProject.VBComponents.Remove _
> NormalTemplate.VBProject.VBComponents("UserForm1")

> --
> Hope this helps.

> Please post any replies to the **newsgroup** so that others in the
newsgroup
> may contribute or benefit.



> | Hi,
> |
> | We start to use a lot of userform and all of them are attached to the
> | normal.dot. This file start to become bigger and bigger, so I decide to
> | export all the Userform in the same directory and import the one that
the
> | user need.
> | I would like to remove it when is done whith the userform but I'm anable
> to
> | fin the way to do that.
> |
> | to import the file I use the following code :
> |
> | ActiveDocument.VBProject.VBComponents.Import
> | (Options.DefaultFilePath(wdUserTemplatesPath) &

Application.PathSeparator

- Show quoted text -

Quote:
> &
> | "UserForm.frm")
> |
> | To remove the Userform, I try
> |
> | ActiveDocument.VBProject.VBComponents.Remove(UserForm)
> |
> | But it's dosen't work
> |
> | Does someone help me ??
> |
> |



Mon, 27 May 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Auto Auto/Hide

2. Auto Run Scripts and Moving Info From One Userform To another

3. Auto-delete message based on character encoding

4. 'Auto Delete Outbox Contents'

5. OL 2000: Auto Delete original message on reply?

6. Auto delete

7. Auto-Delete Temp file

8. auto-deleting files with 2 bytes only

9. Remove title bar from Userform or Window

10. userform stops working after removing VB

11. Remove userform from final document

12. Create Unique Auto Number

 

 
Powered by phpBB® Forum Software