+ Reply to Thread
Results 1 to 4 of 4

VB code required for importing an image into a spreadsheet when you click a button.

  1. #1
    Registered User
    Join Date
    01-28-2014
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    2

    VB code required for importing an image into a spreadsheet when you click a button.

    Hi,
    I have a spreadsheet which I need to be able to click a button and it displays an image, then click another button and it removes the image. Images are stored in my documents, in the pictures folder.
    I have the code for removing images but I'm struggling with getting the image into the spreadsheet. Any suggestions would be great.

    Thanks
    zoe

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: VB code required for importing an image into a spreadsheet when you click a button.

    try something like this :

    Please Login or Register  to view this content.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Registered User
    Join Date
    01-28-2014
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: VB code required for importing an image into a spreadsheet when you click a button.

    Thank you for the code, I have tried this and get a run error of the following: -

    Run time error '1004'
    Insert method of pictures class failed

    Does this mean that it can't find my image? I have checked and the jpg. is in the folder in the G drive, that I have put in my code. Is there something else I'm missing.

  4. #4
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: VB code required for importing an image into a spreadsheet when you click a button.

    it should work, the code was tested in excel 2007.

    try this :

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Vlookup into an image folder and importing the image into the spreadsheet?
    By talan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-30-2017, 12:54 PM
  2. [SOLVED] Running code depending on image click
    By bd528 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-19-2012, 05:26 AM
  3. Replies: 0
    Last Post: 10-11-2012, 04:18 AM
  4. Importing images & image names from a folder into excel spreadsheet
    By RaquelG in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-13-2012, 06:11 AM
  5. Copy Cells from One Spreadsheet to Another with Button CLick
    By gtbear in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-11-2009, 12:59 PM

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