Question:

Is there a way to add pictures to an Excel spreadsheet? Idealy, I would like it to be hidden within a field.?

by  |  earlier

0 LIKES UnLike

I picturing a spreadsheet cell with a button within it you could click on and the picture would pop up. For instance, if it were an Inventory Spreadsheet, the the last field in the line-item would be a field with the button within it. Is this at all possible???

 Tags:

   Report

1 ANSWERS


  1. There are a couple of approaches one could take to accomplish your basic goal.  However, you cannot 'hide a picture within a field'.  The other thing to remember is that images have a high overhead in relation to the size of the spreadsheet.  If you start inserting a group of pictures into a worksheet, the file size of the workbook is going to grow at an alarming rate.  

    If you are talking about a few pictures, then I would suggest that you insert your image (Insert  >  Picture  > From File) size it to your taste and drag it way down on the spreadsheet.  Repeat for each image. Make note of the row number that each image starts at.

    Then you can insert commandbuttons at the end of your inventory line items that, when clicked would automatically scroll down to the row at the beginning of the picture in question.  You would need to add a button near each picture to 'Return' to scrollrow 1.

    Alternatively, you could put each picture on a different sheet and have the button take you to the sheet that contains the image for the line item in question.  Add a button each sheet to take you back to your main sheet.

    How To:

    Open your workbook.

    Copy the following macros to the clipboard as a group.  If you need more 'To_Sheets' than 5, simply copy Sub To_Sheet5 and paste it in, changing both 5's to 6.  Repeat as needed to get to your total number of sheet references.

    Sub To_Sheet1()

    Sheets("Sheet1").Select

    End Sub

    Sub To_Sheet2()

    Sheets("Sheet2").Select

    End Sub

    Sub To_Sheet3()

    Sheets("Sheet3").Select

    End Sub

    Sub To_Sheet4()

    Sheets("Sheet4").Select

    End Sub

    Sub To_Sheet5()

    Sheets("Sheet5").Select

    End Sub

    Next, press ALT + F11

    Insert  >  Module

    Paste the macros into the Module area to the right.

    Close back to Excel.

    Right click on your first button and select 'Assign Macro'.  Select the one that will take you to the sheet that the button relates to.

    Repeat the process for the rest of your buttons.

    Next go to your first 'image' worksheet and create a button.  I would label it 'Home' or something similar.  You can then right click and copy the button.  Go to the next sheet and Paste, go to the next sheet and Paste, etc until you have a button on all required sheets.  

    Then, right click and assign the To_Sheet1 macro to all buttons labeled 'Home'.

    Now, you should be able to navigate between the sheets by simply clicking the buttons.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.