+ Reply to Thread
Results 1 to 3 of 3

Change image using scroll bar

  1. #1
    Registered User
    Join Date
    01-28-2012
    Location
    Buffalo, NY
    MS-Off Ver
    Excel 2011
    Posts
    3

    Change image using scroll bar

    I would like to be able to change the image in an excel file based on the value that is generated from a form scroll bar.

    Specifically, I have 100 images that I want to correspond to numbers 1-100 in a cell. I know how to display the value of the scroll bar on to a specific cell but I cannot make it so the image automatically updates as the values in scroll bar change.

    I would like the minute I change from two adjacent values (e.g. 49 to 50) for the image to automatically refresh.

    I have been trying to do this by loading the images from a folder on an active x image box with the following VBA code:

    Please Login or Register  to view this content.
    The images change when I manually type in and enter a new value in excel, but i would like the image to change as I scroll the scroll bar.

    Any input would be greatly appreciated.
    Last edited by pike; 01-29-2012 at 03:24 AM. Reason: add code tags for newbie

  2. #2
    Forum Expert OnErrorGoto0's Avatar
    Join Date
    12-30-2011
    Location
    I DO NOT POST HERE ANYMORE
    MS-Off Ver
    I DO NOT POST HERE ANYMORE
    Posts
    1,655

    Re: Change image using scroll bar

    Your profile says you are using 2011, but you mention ActiveX controls which do not work on Macs, so which version are you actually using?

    Have you tried moving the code to a routine that you assign to the scroll bar as a macro?
    Good luck.

  3. #3
    Registered User
    Join Date
    01-28-2012
    Location
    Buffalo, NY
    MS-Off Ver
    Excel 2011
    Posts
    3

    Re: Change image using scroll bar

    I was doing this on Excel 2010 for Windows.

    I am sorry for my lack of VBA but how do I move the to a routine that I assign to the scroll bar as a macro? Do I use the same code I posted but geared towards the scroll bar?

  4. #4
    Registered User
    Join Date
    01-28-2012
    Location
    Buffalo, NY
    MS-Off Ver
    Excel 2011
    Posts
    3

    Re: Change image using scroll bar

    I was doing this on Excel 2010 for Windows.

    I am sorry for my lack of VBA but how do I move the to a routine that I assign to the scroll bar as a macro? Do I use the same code I posted but geared towards the scroll bar?

    Also, no need to answer this, but any idea how I would go about doing this on excel for mac where there is no active x support?

    Thank you in advance

+ 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