PC Review


Reply
Thread Tools Rate Thread

calling calendar, get Automation Error

 
 
=?Utf-8?B?QXJub2xkIEtsYXBoZWNr?=
Guest
Posts: n/a
 
      21st Nov 2006
I have a form that calls on the calendar control but I get this error.
Automation Error -2147417848 The object invoked has disconnected from its
clients

below is the code:

Private Sub cboDateReq_MouseDown(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)

CalendarReq.Visible = True
CalendarReq.SetFocus

If Not IsNull(cboDateReq) Then
CalendarReq.Value = cboDateReq.Value
Else
CalendarReq.Value = Date
End If

End Sub

I get the error message in the above code

 
Reply With Quote
 
 
 
 
NickHK
Guest
Posts: n/a
 
      22nd Nov 2006
Arnold,
What do you expect from this line ?
If Not IsNull(cboDateReq) Then

Do you mean
If cboDateReq.ListIndex=-1 Then
'No selection made

Also, do you need the :
CalendarReq.SetFocus

NickHK

"Arnold Klapheck" <(E-Mail Removed)> wrote in
message news:4C4796C8-C366-4D5C-B749-(E-Mail Removed)...
> I have a form that calls on the calendar control but I get this error.
> Automation Error -2147417848 The object invoked has disconnected from its
> clients
>
> below is the code:
>
> Private Sub cboDateReq_MouseDown(ByVal Button As Integer, ByVal Shift As
> Integer, ByVal X As Single, ByVal Y As Single)
>
> CalendarReq.Visible = True
> CalendarReq.SetFocus
>
> If Not IsNull(cboDateReq) Then
> CalendarReq.Value = cboDateReq.Value
> Else
> CalendarReq.Value = Date
> End If
>
> End Sub
>
> I get the error message in the above code
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error with automation - Access 2007 creating Outlook calendar appo JoD Microsoft Access Form Coding 1 23rd Jul 2009 09:12 PM
Access automation error calling a Word template Kevin B Microsoft Access VBA Modules 3 19th Mar 2009 01:46 PM
Calling a C# assembly from Excel or Word (VBA) => Automation Error =?Utf-8?B?R3VudGhlcg==?= Microsoft C# .NET 0 3rd Apr 2006 12:01 PM
Outlook 2003 - No Default Calendar or Contacts - OLE Automation Error? x10engineer@aol.com Microsoft Outlook Discussion 1 12th Oct 2005 04:37 PM
Outlook 2003 Automation Error calling GetNameSpace("Mapi") Rick H Microsoft Outlook VBA Programming 0 17th May 2005 07:21 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:13 PM.