Consulting

Results 1 to 8 of 8

Thread: VBA display pictures in a table

  1. #1

    Question VBA display pictures in a table

    Hi,
    Using formulae and Name Manager I am able to display one picture based on the content on one cell.
    However, this does not help as I am looking into populating a table (few to several rows, this may vary) with pictures based on the content of [@[Reference]], thus allowing several rows to be populated independently based on user input.
    The pictures could be either:
    -in a folder located on C accessible via a path.
    -located in the same workbook if it would be easier.

    The present setup consists of:
    (1) one worksheet with two columns, Column A is the reference code and Column B is the picture inside a resized cell
    (2) one worksheet with a table where the references are identified in each row via Data Validation List and another Column where we would want to see the corresponding picture(s)
    Any advice on how to proceed would be appreciated.
    Again we are open to suggestions and are flexible with the setup.

  2. #2
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    337
    Location
    I recommend building an Access database instead of trying to use Excel like a database.
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Quote Originally Posted by June7 View Post
    I recommend building an Access database instead of trying to use Excel like a database.
    Noted with thanks.
    Any proposed existing form that I could use as a template for such endeavor?
    Or do you suggest to go thought the basics prior to tackling such work?
    The final objective being to simply print the pictures, so the form would be quite ephemeral and would change based on needs.

  4. #4
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    337
    Location
    Sounds like this would be a very small project. No, I don't know of any template.

    Suggest you spend a solid week studying an Access introductory tutorial book to get the basics.

    Use a form for data entry and report for printing.
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Moderator VBAX Master georgiboy's Avatar
    Joined
    Mar 2008
    Location
    Kent, England
    Posts
    1,198
    Location
    If you have Excel 365 and you host your pictures online you can use something like the attached. Exel recently added the IMAGE function that will display an image in a cell of a table.
    Attached Files Attached Files
    Click here for a guide on how to add code tags
    Click here for a guide on how to mark a thread as solved
    Click here for a guide on how to upload a file with your post

    Excel 365, Version 2403, Build 17425.20146

  6. #6
    Will use =IMAGE()

  7. #7
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,728
    Location
    Like many / most /all Microsoft initial release features, I find it lacking since it can only 'link' to a http URL


    Possibly this may help if you have local files

    https://www.youtube.com/watch?v=0NArag0pV7I
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

  8. #8
    Quote Originally Posted by Paul_Hossler View Post
    Like many / most /all Microsoft initial release features, I find it lacking since it can only 'link' to a http URL


    Possibly this may help if you have local files

    https://www.youtube.com/watch?v=0NArag0pV7I
    Thanks for the input.
    Files are presently on Onedrive personal, the reason here is to ensure accessibility regardless of location.
    OneDrive Pro is not used due to issue pertaining to Sharepoint / Excel.
    Our local Microsoft reseller has so far been unable to give us a permanent solution for this, which is a shame considering the associated cost per user per month.

    Considering the volume of items with picture being less than 10,000, it might indeed be a small project.
    I am still looking for the solution that will provide the simplest approach while being shareable without loosing functionality.
    Thanks again for the input, much appreciated.
    =IMAGE() to date provides what the end user needed.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •