+ Reply to Thread
Results 1 to 2 of 2

Deleting images from folder with vba

  1. #1
    Forum Contributor
    Join Date
    01-18-2017
    Location
    Poznań, Poland
    MS-Off Ver
    2016
    Posts
    136

    Deleting images from folder with vba

    Hi,

    I wrote a code that is supposed to delete all the images from the specific folder.

    I did it like that

    Please Login or Register  to view this content.
    I want to delete every single file that extension is either: .jpg, .gif or .png

    but it does not work like it is suppsoed to.
    Could you please take a look at the code and indicate the error?

    Thank you very much in advance.
    Last edited by Szwadron6; 06-01-2017 at 09:06 AM.

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,770

    Re: Deleting images from folder with vba

    By chance is the computer on company network and managed by IT?

    If so, likely that "Desktop" folder isn't the one in your UserProfile, but one in "\Users\Public\Public Desktop\".

    Otherwise, looks like you have extra spaces in your code for jpg & gif.
    “Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.”
    ― Robert A. Heinlein

+ 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] Download images from link and save them in a folder VBA
    By R12345 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-20-2017, 05:22 PM
  2. [SOLVED] Convert all pictures & images in specific folder to vba
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-03-2015, 05:50 AM
  3. Deleting images from a worksheet using vba code
    By jakeembx in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-13-2014, 05:50 PM
  4. Deleting Multiple Images
    By A.S. in forum Excel General
    Replies: 5
    Last Post: 07-11-2013, 06:53 AM
  5. copy all images into folder
    By gsrikanth in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-14-2012, 07:38 AM
  6. Copy images from a folder & paste them in Excel
    By karan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-22-2011, 02:40 PM
  7. [SOLVED] How do I un-embed images in Excel and save them to another folder.
    By marcusgrimm in forum Excel General
    Replies: 1
    Last Post: 06-23-2005, 07:05 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