+ Reply to Thread
Results 1 to 3 of 3

Error with OLEObjects

  1. #1
    Forum Contributor
    Join Date
    03-09-2004
    Posts
    140

    Error with OLEObjects

    Error with OLEObject
    Hi there
    My problem is : when excution gets to this line:

    Please Login or Register  to view this content.

    it gives me
    Please Login or Register  to view this content.
    Any how to solve the Error ?

    Here is the whole code:

    Please Login or Register  to view this content.
    Yours
    hesham Almakki
    http://www.almakki.com.ly/

  2. #2
    Norman Jones
    Guest

    Re: Error with OLEObjects

    Hi Helmekki,

    You code works for me.

    If, however, I mis-spelled the combobox name, I would get your reported
    error.

    Check for subtle name errors, e.g. a leading or trailing space.


    ---
    Regards,
    Norman



    "helmekki" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Error with OLEObject
    > Hi there
    > My problem is : when excution gets to this line:
    >
    >
    > Code:
    > --------------------
    > Set cboTemp = ws.OLEObjects("TempCombo")
    > --------------------
    >
    >
    >
    > it gives me
    > Code:
    > --------------------
    > Methode of OLEObjest of worksheet Failed
    > --------------------
    >
    > Any how to solve the Error ?
    >
    > Here is the whole code:
    >
    >
    > Code:
    > --------------------
    > Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    >
    > Dim str As String
    > Dim cboTemp As OLEObject
    > Dim ws As Worksheet
    > Set ws = ActiveSheet
    >
    > Set cboTemp = ws.OLEObjects("TempCombo")
    > On Error Resume Next
    > If cboTemp.Visible = True Then
    > With cboTemp
    > .Top = 10
    > .Left = 10
    > .ListFillRange = ""
    > .LinkedCell = ""
    > .Visible = False
    > .Value = ""
    > End With
    > End If
    >
    > errHandler:
    > Application.EnableEvents = True
    > Exit Sub
    >
    > End Sub
    > --------------------
    >
    >
    > --
    > helmekki
    >
    >
    > ------------------------------------------------------------------------
    > helmekki's Profile:
    > http://www.excelforum.com/member.php...fo&userid=6939
    > View this thread: http://www.excelforum.com/showthread...hreadid=487993
    >




  3. #3
    Forum Contributor
    Join Date
    03-09-2004
    Posts
    140
    Thank u very much

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1