+ Reply to Thread
Results 1 to 4 of 4

I want the photo to be empty when there is no photo for the employee(Userform)

  1. #1
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769

    I want the photo to be empty when there is no photo for the employee(Userform)

    Hello Everybody
    My file has a form that displays personal data of every employee and his photo.
    When I change the employee Number ,all data +photo change.
    Note: photos are named by the employees No.
    But when there is no photo for specific employee (like Employee No. 5+6) ,the previous photo still exist.
    Required:
    I want the photo to be empty when there is no photo for the employee
    Find the attachment
    Note:Extract the archive in the same folder to view the photos
    Please your support
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: I want the photo to be empty when there is no photo for the employee(Userform)

    Hi leprince2007,

    See the attached file which contains the following code. I added an additional jpg file that indicates there is NO PHOTO on file.

    BEFORE USING, The .txt Extension MUST BE removed from file NoPhotoOnFile.jpg.txt to make the file NoPhotoOnFile.jpg. When I uploaded the file as .jpg, ExcelForum insisted on displaying the picture, so it could not be downloaded.

    Please Login or Register  to view this content.
    Lewis
    Attached Files Attached Files
    Last edited by LJMetzger; 12-22-2016 at 11:37 AM.

  3. #3
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: I want the photo to be empty when there is no photo for the employee(Userform)

    Modify the code as indicated. What this section of code does is check for the existence of the picture and if it does not exist load Blank.jpg. You'll have to develop Blank.jpg.

    Please Login or Register  to view this content.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  4. #4
    Forum Contributor
    Join Date
    02-24-2015
    Location
    Egypt
    MS-Off Ver
    Office 365 ProPlus
    Posts
    769
    Quote Originally Posted by dflak View Post
    Modify the code as indicated. What this section of code does is check for the existence of the picture and if it does not exist load Blank.jpg. You'll have to develop Blank.jpg.

    Please Login or Register  to view this content.
    well done it works

+ 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. Replies: 0
    Last Post: 10-16-2016, 10:48 PM
  2. add photo
    By MetteGaga in forum Suggestions for Improvement
    Replies: 3
    Last Post: 07-23-2015, 05:40 AM
  3. Add Photo
    By rithamworld in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2014, 01:10 PM
  4. photo upload option in the userform and saved as hyperlink into the cell
    By meer_ali in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-02-2014, 12:44 PM
  5. Use variable as photo name VBA
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-17-2013, 02:14 PM
  6. Photo assigning
    By gmcgrane in forum Excel General
    Replies: 4
    Last Post: 05-02-2012, 09:38 AM
  7. Photo in comments box
    By andy-b in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-29-2009, 01:22 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