Results 1 to 4 of 4

Thread: Extract Pictures From Multiple Sheet Overload (Occurring Duplicate)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    Hello susanto
    Welcome to ExcelFox
    Thanks for adding the cross post link.
    Having read the conversation with you and yky at mrexcel.com , I think the biggest problem is communicating with you in English. But I will try :




    _1) With your sample file, the macro errors in the second loop when trying to copy the .png files to the second Folder, BM 3311 R
    I think you have seen that yourself, - on the second loop it errors at
    FSO.CopyFile sTmpFolder & "\s" & i & "_files\*.png", sFolder & "" & WS.Name

    This seems to arise because your second worksheet tab Name has an extra space character on the end, - its name is
    "BM 3311 R "
    ExtraSpaceAtEndOfWsName.JPG : https://imgur.com/n1hsLUv
    ExtraSpaceAtEndOfWsName.JPG
    Do you see that there are 10 characters there. Having 10 characters is not a problem. But the last character having a space seems to cause the problem in the coding.
    If you change the file name to .._
    "BM 3311 R"
    ( there are 9 characters there, no extra space at the end )
    _.. then the macro does not error , and I can run the macro to completion

    _2) Once the macro runs normally, I get correct results. So I am unable to get your problem.
    In the oploded file are 3 pictures in each worksheet.
    Finally , after running the macro I see two folders, each with 3 .png files in it :
    2x3pngPics.JPG : https://imgur.com/rqwHgV3
    2x3pngPics.jpg

    So I can’t repeat the error….

    Alan
    Last edited by DocAElstein; 07-08-2020 at 02:24 PM.

Similar Threads

  1. Replies: 3
    Last Post: 01-10-2020, 01:31 AM
  2. Replies: 2
    Last Post: 02-27-2019, 05:35 PM
  3. Replies: 3
    Last Post: 02-20-2014, 08:06 AM
  4. Move or Copy Duplicate Rows to Difference Sheet
    By Vgabond in forum Excel Help
    Replies: 3
    Last Post: 12-08-2012, 12:33 PM
  5. Extract multiple data matching with input
    By excel_learner in forum Excel Help
    Replies: 1
    Last Post: 02-13-2012, 06:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •