Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Object invoked disconnected from its clients.

Dear members;

I have a "password" userform.
The user can enter his password in a textbox and click OK or press Enter.

The OK commandbutton and the Exit event resulting from pressing Enter both
trigger the same procedure Check_Password to evaluate
a users rights.
When I insert a false password, the routine works fine for both clicking the
OK commandbutton and when pressing Enter.
The application closes.
When I insert a valid password and press Enter, the routine works fine as
well.

But, when I insert a valid password and click the OK commandbutton, an error
occurs telling me that
"The object invoked disconnected from its clients".

It seems to me that the routine fails because it fires the same procedure
twice.
Once after Clicking OK and in the same time because of the Exit event.
Can it be because the Exit(ByVal cancel As MSForms.ReturnBoolean) event
always comes before clicking the OK button ?
Does it have to deal with losing or stealing focus ?

If so, how must I solve this ?

--
Mark Rosenkrantz
---
Spreadsheet Solutions
Witkopeend 24
1423 SN
Uithoorn, Netherlands
---
E:
W:
www.rosenkrantz.nl


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Object invoked disconnected from its clients.

OK;
I Found out.
I had to add Cancel = true

Thanks anyway.
Mark.

"Spreadsheet Solutions" wrote in message
. ..
Dear members;

I have a "password" userform.
The user can enter his password in a textbox and click OK or press Enter.

The OK commandbutton and the Exit event resulting from pressing Enter both
trigger the same procedure Check_Password to evaluate
a users rights.
When I insert a false password, the routine works fine for both clicking
the OK commandbutton and when pressing Enter.
The application closes.
When I insert a valid password and press Enter, the routine works fine as
well.

But, when I insert a valid password and click the OK commandbutton, an
error occurs telling me that
"The object invoked disconnected from its clients".

It seems to me that the routine fails because it fires the same procedure
twice.
Once after Clicking OK and in the same time because of the Exit event.
Can it be because the Exit(ByVal cancel As MSForms.ReturnBoolean) event
always comes before clicking the OK button ?
Does it have to deal with losing or stealing focus ?

If so, how must I solve this ?

--
Mark Rosenkrantz
---
Spreadsheet Solutions
Witkopeend 24
1423 SN
Uithoorn, Netherlands
---
E:
W:
www.rosenkrantz.nl




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
Automation Error : The Object Invoked Has Disconnected From Its Clients !! [email protected] Excel Programming 3 June 17th 05 01:17 PM
help please!!! error "object invoked has disconnected from its cli Valeria Excel Programming 0 November 25th 04 09:49 AM
Automation Error: The Object Invoked Has Disconnected from Its Clients (Excel) Vaibhav Excel Programming 0 September 8th 03 04:57 PM
Automation Error: The Object Invoked Has Disconnected from Its Clients Vaibhav Dandavate Excel Programming 0 September 8th 03 04:05 PM
The object invoked has disconnected from its clinets Don[_7_] Excel Programming 2 August 20th 03 02:30 AM


All times are GMT +1. The time now is 04:07 AM.

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

About Us

"It's about Microsoft Excel"