+ Reply to Thread
Results 1 to 4 of 4

Need to loop a macro to save images to file - but save to user defined directory.

  1. #1
    Registered User
    Join Date
    02-15-2010
    Location
    Cardiff, Wales
    MS-Off Ver
    Excel XP
    Posts
    16

    Need to loop a macro to save images to file - but save to user defined directory.

    Hello all!

    I am working on a really useful bit of code that I found on another thread here: http://www.excelforum.com/excel-prog...el-2010-a.html

    The following code works perfectly. However, I want to modify it so that I can:

    - Allow the macro to work over a number of rows, defined within the macro. E.g I only want it to extract the images in column A up until row 20.
    - Allow the user to set a different local directory to download to in range D2, and to this directory, save the images from row 21 to row 40.
    - And so on, for another local directory in range D3, and for rows 41 - 60.

    Anyone have any idea how I could best acheive this? My original code is below. Many thanks in advance for your help!


    Please Login or Register  to view this content.

  2. #2
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: Need to loop a macro to save images to file - but save to user defined directory.

    This defines the specific user
    Please Login or Register  to view this content.
    And as far as the directory you could have a message box pop up that they could type in the directory or I'm sure that you could use something else where they could select to save the pictures under a directory through the save box but not sure how to generate that at the moment. Hopefully that helps some at least.

    I believe this will work for being specific however you should test the theory on a test worksheet.
    Please Login or Register  to view this content.
    Thank those who have helped you by clicking the Star * below their name and please mark your post [SOLVED] if it has been answered satisfactorily.

  3. #3
    Registered User
    Join Date
    02-15-2010
    Location
    Cardiff, Wales
    MS-Off Ver
    Excel XP
    Posts
    16

    Re: Need to loop a macro to save images to file - but save to user defined directory.

    Hi Jack,

    I don't think I was clear enough with my original description.

    I've attached a simplified version of my spreadsheet that sets out what I need to do. Basically, I need my macro to run three time against a different range of cells in column A, allowing the user to define a save location for each set of files.

    Any further pointers/help much appreciated
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-15-2010
    Location
    Cardiff, Wales
    MS-Off Ver
    Excel XP
    Posts
    16

    Re: Need to loop a macro to save images to file - but save to user defined directory.

    After much trial and error, and tweaks to what I originally needed, I eventually got there with this bit of code.

    Please Login or Register  to view this content.
    Thanks to anyone who took a look :D

+ 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] Need loop to save multiple images from web to local directory.
    By superfurry in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-14-2015, 08:46 PM
  2. Auto save IE file download dialog box in a user defined path
    By sugaprasad in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-27-2014, 05:21 AM
  3. Replies: 2
    Last Post: 01-16-2013, 03:10 PM
  4. Macro to save file in same directory
    By CharlesRheault in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-24-2012, 04:01 PM
  5. Macro to save file in a specified directory and name
    By 4romseyavenue in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-27-2011, 12:09 PM
  6. Macro-Create a file and save it under a changing directory
    By vargs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-19-2010, 12:31 PM
  7. Replies: 3
    Last Post: 06-11-2009, 07:08 PM

Tags for this Thread

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