Results 1 to 11 of 11

Picture when combo box is changed

Threaded View

  1. #1
    bugmenot
    Guest

    Exclamation Picture when combo box is changed

    Hey guys,

    This is the first VBA project i've done on Excel, and its not very big. I've never done any programming before, but i need help on this

    What i'm trying to do it to have the Combo box that when an item is selected the respective picture shows next to it (i've got a seperate sheet with the products, prices, pics etc...)

    After trying everything to get the picture to show, i switched to VBA because it looked like i could do it in that. The first thing i did was record a macro for each picture - the first one goes like this (its called TEST)

    Sub TEST()
    '
    ' TEST Macro
    '
    
    '
        Range("M4").Select
        Sheets("Products").Select
        Selection.Copy
        Sheets("Quotes").Select
        Range("M4").Select
        ActiveSheet.Paste
        Range("N4").Select
    End Sub
    The first problem i had was with Sheets("Quotes").Select - for some reason it didn't like it and gave me an error. After some googling I solved it.

    Now the problem i've got is with the Worksheet Change (is this the right thing to use?)

    This is what i've got -
    Private Sub Worksheet_Change(ByVal Target As Range)
    If L4 = 1 (1 is the value that comes from the combo box) Then
            TEST
        End If
    End Sub
    Correct me if i'm wrong, but this should run every time something is changed on the sheets?
    Nothing happens when I select the first value in my combo box.

    Any help would be great

    Thanks =)
    Last edited by bugmenot; 06-28-2009 at 03:26 AM.

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