Inserting an image inside of a userform dependent on a record number

  • This is in a Excel 365 Userform...

    I have a command button (ADD) that looks at my customer's record number (TBrecord.value). If there isn't a number it assigns one, otherwise it edits the existing record.

    The second page of my userform contains a picture insert. I'm wanting to change this picture to a jpg image of a call tree diagram. These images are stored in a folder titled Images and are named with the customer's record number 001, 002, 003 etc. (TBrecord.value).

    I am trying to come up with a macro that I can add inside of my sub that will use the customer's record number (TBrecord.value) and insert it inside of the image's address when this sub is used.

    CallTree.Picture = Load Picture ("Y:\CCX Applications\") & ("TBrecord.jpg")

    Thanks in advance. I appreciate any help.

  • Thanks for looking at it Roy.

    I have attached pictures of my form and a sample image.

    Below is the beginning of my command button Sub.

    my plans was to just add a macro inside it that would use the value of TBrecord to populate the second page with the sample image.


  • Rory,

    This is a rather large workbook and is just way too involved to post. I really appreciate your willingness to help, but I was able find what I needed. Thanks for your help,


  • Roy and I are two different people. :) (and I know you found what you needed, since you got it from me ;))

    Theory is when you know something, but it doesn’t work. Practice is when something works, but you don’t know why. Programmers combine theory and practice: nothing works and they don’t know why

  • Well thanks again. I appreciate your help. I knew that I was so close to having it, but as they say "close only counts in horseshoes and hand grenades". :)