Results 1 to 5 of 5

Error adding ActiveX Control Combo box with "For Each oPic In Me.Pictures"

Threaded View

cbell Error adding ActiveX Control... 09-26-2011, 01:28 PM
davegugg Re: Error adding ActiveX... 09-26-2011, 02:54 PM
beaunydal Re: Error adding ActiveX... 09-26-2011, 07:13 PM
cbell Re: Error adding ActiveX... 09-27-2011, 12:43 PM
deleted_alien Re: Error adding ActiveX... 09-23-2013, 02:43 PM
  1. #1
    Registered User
    Join Date
    09-26-2011
    Location
    Rhode Island
    MS-Off Ver
    Excel 2007
    Posts
    2

    Smile Error adding ActiveX Control Combo box with "For Each oPic In Me.Pictures"

    Hello

    I am new to the formum and just getting into more VB thru Excel and I am looking for a little help please.

    I read multiple threads/posts on using pictures within excel.

    I have the image lookup working great using this code based on http://www.mcgimpsey.com/excel/lookuppics.html.

    Private Sub Worksheet_Calculate()
            Dim oPic As Picture
            Me.Pictures.Visible = False
            With Range("F1")
                For Each oPic In Me.Pictures
                    If oPic.Name = .Text Then
                        oPic.Visible = True
                        oPic.Top = .Top
                        oPic.Left = .Left
                        Exit For
                    End If
                Next oPic
            End With
    End Sub
    However, now when I go to insert an activex control Combobox I start getting errors.
    Run-time error '13' to be specific.
    Plus my combobox disappers.

    If I go back into design mode and delete combobox the issue goes away.

    I am looking to add multiple activex comboboxes and would appreciate any help.

    Thanks
    Cbell
    Last edited by cbell; 09-28-2011 at 08:53 AM. Reason: Fixed Code Tags

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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