+ Reply to Thread
Results 1 to 3 of 3

Choose folder then file when insert image

  1. #1
    Registered User
    Join Date
    06-09-2016
    Location
    Arad, Romania
    MS-Off Ver
    office 2010
    Posts
    2

    Choose folder then file when insert image

    Hello,
    Could anyone help me if possible with a VBA Code that inserts a .jpeg file from a 2 folders. To be more specific something like this :
    Main Folder path: D:\Paul\Proiect fluturi\Cercetare\LEPIDOPERA DATA BASE\Plante gazda
    The second folder \Ballota nigra ( is latin name of a plant) is part of Plante gazda folder .
    The main cell value= "Plante gazda" Folder
    The second cell will contain the .jpeg file name that need to be inserted in the Database
    As exemple in Cell A1= Corn = Folder name --> the code must chose the folder by the A1 reference
    in Cell A2= Pic1, Pic2, Pic3..... ( I will select it from a Data Validation list) = .jpeg file name --> the code must chose the file based on Cell A2 reference an inser the picture

    Because this is a Database this must be dynamic, if search for another species and select another file it must delete the previous one.


    As a note I am using a similar code that inserts a picture based only a cell value that equals with the .jpeg file name and it looks like this

    Please Login or Register  to view this content.
    Last edited by redapa1; 11-07-2016 at 05:37 PM. Reason: code tags added

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,906

    Re: Choose folder then file when insert image

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    06-09-2016
    Location
    Arad, Romania
    MS-Off Ver
    office 2010
    Posts
    2

    Re: Choose folder then file when insert image

    My mistake thanks for the correction and for the advice this is my first post hope you understand

+ 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. [SOLVED] Insert Image into Mail from Folder in which Workbook is stored
    By Jonathan78 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-21-2016, 02:44 PM
  2. VBA to Open a folder to then select an image that will insert in spredsheet
    By mitchellA in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-04-2016, 09:05 AM
  3. Insert Image in ImageBox after clicking it on folder
    By brainzlp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-04-2015, 07:44 AM
  4. [SOLVED] (VBA) Insert image from a folder
    By Zgoda in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-25-2015, 12:02 PM
  5. Let User Choose Folder to Save, but not File Name
    By FallingDown in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 04-09-2014, 11:14 AM
  6. [SOLVED] Insert jpg image from file path to image frame
    By SAsplin in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-27-2012, 10:12 AM
  7. Replies: 0
    Last Post: 04-16-2012, 10:57 AM

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