Mouse Move to close user form Causes Automation Error

R

RandyDtg1

Mouse Move Causes Automation Error
I want to use mouse move to close a second form (hide or unload)
It works fine until I make it a .dot in the startup folder, then I get an
Automation error.

I've tried several things, including using 'on error resume', but can not get
it to work as a .dot in Start Up.

Any suggestions would be appreciated.
TIA
 
P

Perry

Hi RandyDtg1,

Y'll have to kick in relevant parts of yr code.
It's kinda hard to look at yr problem without ...

Krgrds,
Perry
 
R

RandyDtg1

The code I have is:

Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer,
ByVal X As Single, ByVal Y As Single)
Unload Me
End Sub

It works fine when I test the program, opened as randy.dot,
I then re-start Word with rand.dot in the word startup folder.

Then the code causes an automation error when the mouse move occurs. This is a
secondary form. It appears that the error is with the first form, and that the
secondary form is closed.

This is my attempt to display a message that is easily removed, like with the
mouse move over the secondary form.

Any ideas or suggestions to try?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top