#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default UserForm

Thanks for taking the time to read my question.

I have a form that I use for data entry.

I have several buttons on it through which I can close
the form using the Unload UserForm3 statement.

I have an AfterUpdate event on an combobox that says that
if criteria are met, run some functions, display a
message, and close the form.

This causes me problems because the code returns to the
line that loaded the form instead of the line after and
then the error occurs. I've tried error handling for
that specific error, but it doesn't help.

The error I recieve is:

- - - - - - - - - - - - - - -
Run-time error '-2147417848(80010108)'

Automation Error
The object invoked has disconnected from its clients.
- - - - - - - - - - - - - - -

If I end the code and return to the worksheet manually, I
can select cells with my mouse but can't do anything with
my keyboard. I can close the workbook, but not Excel. I
have to do a Ctrl+Alt+Del and End Process on Excel.

How do I close this UserForm with out getting this error?

Here is my code that loads the User Form:

- - - - - - - - - - -
If ActiveCell.Column = 8 And ActiveCell.Row 20 And
ActiveCell.Row < 65 Then
Load UserForm3
UserForm3.Show 'this is where the error occurs after
the code runs for closing the User Form. The code stops
here and you cannot F8 past it or anything.
End If
- - - - - - - - - - -

Here is my code that closes the User Form

- - - - - - - - - - -
If x < Sheets("Code").Range("W3") And Me.TextBox2.Text
< "N/A" Then
DontRunThroughFlockSheetSelectionChange = True
'Unload UserForm3
Sheets("Flock Sheet").Cells(ActiveCell.Row,
ActiveCell.Column + 5).Select
UpdateFeedRequirements
MsgBox "Feed Requirements have been updated, and the
next stage should now be delivered.", 64
DontRunThroughFlockSheetSelectionChange = False
Unload UserForm3
Else
Me.CommandButton2.SetFocus
End If
- - - - - - - - - - -

Thanks so much for the help.

Brad
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default UserForm

Brad

First, download the Code Cleaner utility from http://www.appspro.com/. That
will usually solve the problem. If it doesn't, then where is the code that
closes the form? In the AfterUpdate event?

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Brad" wrote in message
...
Thanks for taking the time to read my question.

I have a form that I use for data entry.

I have several buttons on it through which I can close
the form using the Unload UserForm3 statement.

I have an AfterUpdate event on an combobox that says that
if criteria are met, run some functions, display a
message, and close the form.

This causes me problems because the code returns to the
line that loaded the form instead of the line after and
then the error occurs. I've tried error handling for
that specific error, but it doesn't help.

The error I recieve is:

- - - - - - - - - - - - - - -
Run-time error '-2147417848(80010108)'

Automation Error
The object invoked has disconnected from its clients.
- - - - - - - - - - - - - - -

If I end the code and return to the worksheet manually, I
can select cells with my mouse but can't do anything with
my keyboard. I can close the workbook, but not Excel. I
have to do a Ctrl+Alt+Del and End Process on Excel.

How do I close this UserForm with out getting this error?

Here is my code that loads the User Form:

- - - - - - - - - - -
If ActiveCell.Column = 8 And ActiveCell.Row 20 And
ActiveCell.Row < 65 Then
Load UserForm3
UserForm3.Show 'this is where the error occurs after
the code runs for closing the User Form. The code stops
here and you cannot F8 past it or anything.
End If
- - - - - - - - - - -

Here is my code that closes the User Form

- - - - - - - - - - -
If x < Sheets("Code").Range("W3") And Me.TextBox2.Text
< "N/A" Then
DontRunThroughFlockSheetSelectionChange = True
'Unload UserForm3
Sheets("Flock Sheet").Cells(ActiveCell.Row,
ActiveCell.Column + 5).Select
UpdateFeedRequirements
MsgBox "Feed Requirements have been updated, and the
next stage should now be delivered.", 64
DontRunThroughFlockSheetSelectionChange = False
Unload UserForm3
Else
Me.CommandButton2.SetFocus
End If
- - - - - - - - - - -

Thanks so much for the help.

Brad



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default UserForm

Yes it is in the AfterUpdate event of a combo box on the
form.

Brad
-----Original Message-----
Brad

First, download the Code Cleaner utility from

http://www.appspro.com/. That
will usually solve the problem. If it doesn't, then

where is the code that
closes the form? In the AfterUpdate event?

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Brad" wrote in

message
...
Thanks for taking the time to read my question.

I have a form that I use for data entry.

I have several buttons on it through which I can close
the form using the Unload UserForm3 statement.

I have an AfterUpdate event on an combobox that says

that
if criteria are met, run some functions, display a
message, and close the form.

This causes me problems because the code returns to the
line that loaded the form instead of the line after and
then the error occurs. I've tried error handling for
that specific error, but it doesn't help.

The error I recieve is:

- - - - - - - - - - - - - - -
Run-time error '-2147417848(80010108)'

Automation Error
The object invoked has disconnected from its clients.
- - - - - - - - - - - - - - -

If I end the code and return to the worksheet

manually, I
can select cells with my mouse but can't do anything

with
my keyboard. I can close the workbook, but not

Excel. I
have to do a Ctrl+Alt+Del and End Process on Excel.

How do I close this UserForm with out getting this

error?

Here is my code that loads the User Form:

- - - - - - - - - - -
If ActiveCell.Column = 8 And ActiveCell.Row 20 And
ActiveCell.Row < 65 Then
Load UserForm3
UserForm3.Show 'this is where the error occurs

after
the code runs for closing the User Form. The code stops
here and you cannot F8 past it or anything.
End If
- - - - - - - - - - -

Here is my code that closes the User Form

- - - - - - - - - - -
If x < Sheets("Code").Range("W3") And Me.TextBox2.Text
< "N/A" Then
DontRunThroughFlockSheetSelectionChange = True
'Unload UserForm3
Sheets("Flock Sheet").Cells(ActiveCell.Row,
ActiveCell.Column + 5).Select
UpdateFeedRequirements
MsgBox "Feed Requirements have been updated, and

the
next stage should now be delivered.", 64
DontRunThroughFlockSheetSelectionChange = False
Unload UserForm3
Else
Me.CommandButton2.SetFocus
End If
- - - - - - - - - - -

Thanks so much for the help.

Brad



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default UserForm

Brad

Does that mean Code Cleaner didn't fix it. You may be stuck recreating the
workbook.

--
Dick Kusleika
MVP - Excel Blog - Daily Dose of Excel
www.dicks-blog.com

wrote in message
...
Yes it is in the AfterUpdate event of a combo box on the
form.

Brad
-----Original Message-----
Brad

First, download the Code Cleaner utility from

http://www.appspro.com/. That
will usually solve the problem. If it doesn't, then

where is the code that
closes the form? In the AfterUpdate event?

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Brad" wrote in

message
...
Thanks for taking the time to read my question.

I have a form that I use for data entry.

I have several buttons on it through which I can close
the form using the Unload UserForm3 statement.

I have an AfterUpdate event on an combobox that says

that
if criteria are met, run some functions, display a
message, and close the form.

This causes me problems because the code returns to the
line that loaded the form instead of the line after and
then the error occurs. I've tried error handling for
that specific error, but it doesn't help.

The error I recieve is:

- - - - - - - - - - - - - - -
Run-time error '-2147417848(80010108)'

Automation Error
The object invoked has disconnected from its clients.
- - - - - - - - - - - - - - -

If I end the code and return to the worksheet

manually, I
can select cells with my mouse but can't do anything

with
my keyboard. I can close the workbook, but not

Excel. I
have to do a Ctrl+Alt+Del and End Process on Excel.

How do I close this UserForm with out getting this

error?

Here is my code that loads the User Form:

- - - - - - - - - - -
If ActiveCell.Column = 8 And ActiveCell.Row 20 And
ActiveCell.Row < 65 Then
Load UserForm3
UserForm3.Show 'this is where the error occurs

after
the code runs for closing the User Form. The code stops
here and you cannot F8 past it or anything.
End If
- - - - - - - - - - -

Here is my code that closes the User Form

- - - - - - - - - - -
If x < Sheets("Code").Range("W3") And Me.TextBox2.Text
< "N/A" Then
DontRunThroughFlockSheetSelectionChange = True
'Unload UserForm3
Sheets("Flock Sheet").Cells(ActiveCell.Row,
ActiveCell.Column + 5).Select
UpdateFeedRequirements
MsgBox "Feed Requirements have been updated, and

the
next stage should now be delivered.", 64
DontRunThroughFlockSheetSelectionChange = False
Unload UserForm3
Else
Me.CommandButton2.SetFocus
End If
- - - - - - - - - - -

Thanks so much for the help.

Brad



.



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
UserForm grahammal Excel Discussion (Misc queries) 15 April 10th 06 06:01 PM
Userform nath Excel Programming 1 May 25th 04 03:06 PM
Userform inside another userform Ryan Excel Programming 0 April 23rd 04 08:01 PM
userform billQ Excel Programming 3 November 19th 03 03:41 AM
userform Antonov Excel Programming 6 August 26th 03 03:41 AM


All times are GMT +1. The time now is 07:25 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"